Closed denisse-dev closed 5 years ago
@da-edra There must be some problem with your module cache. Can you please clear your cache and try again?
I have cloned the repository in a fresh docker container and it has been built without problem.
$ docker run -it golang:1.13.0
root@c5c6b1be954e:/go# cd
root@c5c6b1be954e:~# go get github.com/cenkalti/rain
root@c5c6b1be954e:~# which rain
/go/bin/rain
root@c5c6b1be954e:~# rain
NAME:
rain - BitTorrent client from https://put.io
USAGE:
rain [global options] command [command options] [arguments...]
VERSION:
0.0.0
COMMANDS:
download download single torrent
server run rpc server and torrent client
client send rpc request to server
torrent manage torrent files
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--debug, -d enable debug log
--help, -h show help
--version, -v print the version
Does go build
work for you?
For me, it does not build.
Yes it does.
On 2 Oct 2019 Wed at 18:58 andrea_denisse.go notifications@github.com wrote:
Does go build work for you? For me, it does not build.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cenkalti/rain/issues/3?email_source=notifications&email_token=AAFBQ4TVNJ2G64N6JD2Z3GDQMTAKJA5CNFSM4I4NAIS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAFIO3I#issuecomment-537560941, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFBQ4WFR7PVXGVNOYIQMU3QMTAKJANCNFSM4I4NAISQ .
I can confirm, it happens for me too:
➜ rain git:(master) go build -o rain .
go: finding github.com/mattn/go-isatty v0.0.9
go: finding github.com/urfave/cli v1.22.1
go: finding github.com/fortytw2/leaktest v1.3.0
go: finding github.com/cenkalti/go-metrics v0.0.0-20190910102919-35c391953d1c
go: finding github.com/cenkalti/boltbrowser v0.0.0-20190327195521-ebed13c76690
go: finding github.com/gofrs/uuid v3.2.0+incompatible
go: finding github.com/fatih/color v1.7.0
go: finding github.com/cenkalti/log v0.0.0-20180808170110-e1cf6d40cbc3
go: finding github.com/mattn/go-colorable v0.1.2
go: finding github.com/youtube/vitess v2.2.0-rc.1+incompatible
go: finding github.com/jroimartin/gocui v0.4.0
go: finding github.com/cyberdelia/go-metrics-graphite v0.0.0-20161219230853-39f87cc3b432
go: finding github.com/hashicorp/go-multierror v1.0.0
go: finding github.com/zeebo/bencode v1.0.0
go: finding github.com/juju/ratelimit v1.0.1
go: finding github.com/chihaya/chihaya v0.0.0-20190113170711-5f99a7e77885
go: github.com/cenkalti/go-metrics@v0.0.0-20190910102919-35c391953d1c: unknown revision 35c391953d1c
go: finding github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317
go: finding github.com/br0xen/termbox-util v0.0.0-20190325151025-c168c0df31ca
go: finding github.com/nictuku/dht v0.0.0-20190424204932-20d30c21bd4c
go: finding github.com/multiformats/go-multihash v0.0.8
go: finding github.com/prometheus/procfs v0.0.5
go: finding github.com/cenkalti/backoff/v3 v3.0.0
go: finding github.com/fatih/structs v1.1.0
go: finding github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: finding github.com/br0xen/termbox-util v0.0.0-20170904143325-de1d4c83380e
go: finding golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe
go: finding github.com/nsf/termbox-go v0.0.0-20180819125858-b66b20ab708e
go: finding github.com/powerman/rpc-codec v1.1.3
go: finding github.com/minio/sha256-simd v0.1.1
go: finding github.com/mattn/go-isatty v0.0.8
go: finding golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392
go: finding github.com/prometheus/common v0.7.0
go: finding github.com/cpuguy83/go-md2man/v2 v2.0.0
go: finding github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e
go: error loading module requirements
Go version:
go version go1.12 darwin/amd64
Last commit:
commit b4389b1585182d3743b8bd77ccfea54295c517f6 (HEAD -> master, origin/master, origin/HEAD)
Author: Cenk Alti <cenkalti@gmail.com>
Date: Thu Oct 3 15:11:42 2019 +0300
return peer id if no extension handshake received
EDIT: After upgrading to go1.13
, it builds fine. I don't know if this is because my cache is cleared or because it's a go version problem.
Works, no problem 👍🏻
docker run -it --rm golang:1.13 /bin/bash -c 'go get -u github.com/cenkalti/rain && which rain'
It won't compile in 1.12 because I have used the new errors
package that comes with 1.13.
https://github.com/cenkalti/rain/blob/615bef24b22c67c8eb28fe83a6e54a73f9612092/torrent/session_rpc_handler.go#L50
Use Go 1.13 to compile.
Also there are precompiled binaries if you want to download: https://github.com/cenkalti/rain/releases