Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

fix: replace git.apache.org/thrift.git by its github #131

Merged
merged 1 commit into from
Sep 6, 2019
Merged

fix: replace git.apache.org/thrift.git by its github #131

merged 1 commit into from
Sep 6, 2019

Conversation

kamilsk
Copy link
Contributor

@kamilsk kamilsk commented Sep 6, 2019

No description provided.

@caarlos0 caarlos0 changed the title issue #129: replace git.apache.org/thrift.git by its github fix: replace git.apache.org/thrift.git by its github Sep 6, 2019
@caarlos0 caarlos0 merged commit 7d30e44 into goreleaser:master Sep 6, 2019
@caarlos0
Copy link
Member

caarlos0 commented Sep 6, 2019

thanks

@ldez
Copy link
Contributor

ldez commented Sep 6, 2019

Hello,

This PR create a regression:

$ go build .
go: github.com/apache/thrift@v0.12.0 used for two different module paths (git.apache.org/thrift.git and github.com/apache/thrift)

@ldez ldez mentioned this pull request Sep 6, 2019
@kamilsk
Copy link
Contributor Author

kamilsk commented Sep 7, 2019

cannot reproduce

$ git clone git@github.com:goreleaser/godownloader.git
$ cd godownloader
$ go build .

$ la | grep godownloader
-rwxr-xr-x   1 ...  1285728151    28M  ... godownloader*

$ go version
go version go1.12.6 darwin/amd64

and after the patch, I don't have any problem with the tool octopot/tablo@15c710d

@ldez
Copy link
Contributor

ldez commented Sep 7, 2019

$ go version
go version go1.13 linux/amd64

$ go build .
go: github.com/goreleaser/goreleaser@v0.110.0 requires
	gocloud.dev@v0.13.0 requires
	contrib.go.opencensus.io/exporter/ocagent@v0.4.2 requires
	github.com/census-instrumentation/opencensus-proto@v0.1.0-0.20181214143942-ba49f56771b8: invalid pseudo-version: version before v0.1.0 would have negative patch number

$ echo '// related to an invalid pseudo version in code.gitea.io/gitea v1.10.0-dev.0.20190711052757-a0820e09fbf7' >> go.mod
$ echo 'replace github.com/go-macaron/cors => github.com/go-macaron/cors v0.0.0-20190418220122-6fd6a9bfe14e' >> go.mod
$ echo '// related to an invalid pseudo version in contrib.go.opencensus.io/exporter/ocagent@v0.4.2' >> go.mod
$ echo 'replace github.com/census-instrumentation/opencensus-proto => github.com/census-instrumentation/opencensus-proto v0.0.3-0.20181214143942-ba49f56771b8' >> go.mod

$ go build .
go: github.com/apache/thrift@v0.12.0 used for two different module paths (git.apache.org/thrift.git and github.com/apache/thrift)

$ sed '/git.apache.org/d' go.mod > go.mod.tmp; mv go.mod.tmp go.mod
$ go build .

$ ls -alF | grep godownloader
-rwxr-xr-x 1 ldez ldez 28146427  7 sept. 14:24 godownloader*

FYI the replace directive is not transitive: https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive

@kamilsk
Copy link
Contributor Author

kamilsk commented Sep 7, 2019

thanks for more context!

@kamilsk
Copy link
Contributor Author

kamilsk commented Sep 7, 2019

how to be with git.apache.org/thrift.git without setting GOPROXY?

$ docker run --rm -it -e GOPROXY=direct golang:1.13 bash -c \
> 'cd /opt; go mod init test; go get git.apache.org/thrift.git@v0.12.0'

go: creating new go.mod: module test
go: finding git.apache.org/thrift.git v0.12.0
go get git.apache.org/thrift.git@v0.12.0: git.apache.org/thrift.git@v0.12.0: invalid version: unknown revision v0.12.0
$ docker run --rm -it -e GOPROXY=https://gocenter.io golang:1.13 bash -c \
'cd /opt; go mod init test; go get git.apache.org/thrift.git@v0.12.0'

go: creating new go.mod: module test
go: finding git.apache.org v0.12.0
go: finding git.apache.org/thrift.git v0.12.0
go: downloading git.apache.org/thrift.git v0.12.0
go: extracting git.apache.org/thrift.git v0.12.0

the same output for https://proxy.golang.org

go 1.13 has no problems by default because

$ docker run --rm -it golang:1.13 go env GOPROXY
https://proxy.golang.org,direct

but go 1.12 and 1.11 have empty GOPROXY

$ docker run --rm -it golang:1.12 go env GOPROXY

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants