go-socket.io icon indicating copy to clipboard operation
go-socket.io copied to clipboard

git.apache.org/thrift.git is no longer available

Open AkashiSN opened this issue 4 years ago • 3 comments

Summary Thrift is no longer available at the location in go.sum. It's now distributed on Github at github.com/apache/thrift. The official documentation has also been updated.

Steps to reproduce the behavior

$ git clone  [email protected]:googollee/go-socket.io.git
$ export GO111MODULE=on
$ cd go-socket.io
$ go mod download 
go: finding git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999
go: git.apache.org/[email protected]: git fetch -f https://git.apache.org/thrift.git refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in 83dba939f95a790e497d565fc4418400145a1a514f955fa052f662d56e920c3e: exit status 128:
          fatal: unable to access 'https://git.apache.org/thrift.git/': Failed to connect to git.apache.org port 443: Timed out
go: error loading module requirements

AkashiSN avatar Sep 02 '19 11:09 AkashiSN

I'd like to propose the code as following.

diff --git a/go.mod b/go.mod
index 45b15e6..7cce8b8 100644
--- a/go.mod
+++ b/go.mod
@@ -4,3 +4,5 @@ require (
 	github.com/googollee/go-engine.io v1.4.1
 	github.com/stretchr/testify v1.3.0
 )
+
+replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
diff --git a/go.sum b/go.sum
index 66b5a7c..2e296f9 100644
--- a/go.sum
+++ b/go.sum
@@ -5,9 +5,9 @@ dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl
 dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
 dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
 dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
-git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
+github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
 github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=

AkashiSN avatar Sep 02 '19 12:09 AkashiSN

To make builds more deterministic, you can set GOPROXY to https://gocenter.io

GoCenter has both of the modules in question, for example, https://search.gocenter.io/github.com~2Fapache~2Fthrift/info and https://search.gocenter.io/git.apache.org~2Fthrift.git/info.

Since the project does not have a go.mod file (hence no enforcement of a module name), both will work.

ankushchadha avatar Sep 04 '19 20:09 ankushchadha

Please make a PR

erkie avatar Sep 16 '20 07:09 erkie