Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go mod depends on 1.12 #79

Closed
jared2501 opened this issue Feb 21, 2019 · 11 comments
Closed

go mod depends on 1.12 #79

jared2501 opened this issue Feb 21, 2019 · 11 comments

Comments

@jared2501
Copy link
Contributor

The go module currently depends on an unreleased version of go. Can we bump the requires go version down to a released version?

@jprobinson
Copy link
Contributor

Is the use of 1.12 negatively affecting you in some way?

It's in RC1 so it's the default version of Go internally to Google at this point, so should be fine to use in pipelines.

@jared2501
Copy link
Contributor Author

jared2501 commented Feb 21, 2019 via email

@fsouza
Copy link
Contributor

fsouza commented Feb 21, 2019

@jared2501 the version of go specified in go.mod is informative and doesn't actually do anything. It's used by Go to suggest that you may need to upgrade you version in case the module doesn't compile, but gziphandler doesn't actually require 1.12.

See https://tip.golang.org/doc/go1.12#modules

The go directive in a go.mod file now indicates the version of the language used by the files within that module. It will be set to the current release (go 1.12) if no existing version is present. If the go directive for a module specifies a version newer than the toolchain in use, the go command will attempt to build the packages regardless, and will note the mismatch only if that build fails.

@jared2501
Copy link
Contributor Author

Hmm I'm not seeing this on go 1.11:

✓ jnewman@Jareds-MacBook-Pro:~/dev/front-door | jn/gzip● $ CGO_ENABLED=0 GOOS=darwin go build -v -o build/darwin-amd64/front-door ./cmd/front-door
github.com/NYTimes/gziphandler
go build github.com/NYTimes/gziphandler: module requires Go 1.12
✕ jnewman@Jareds-MacBook-Pro:~/dev/front-door | jn/gzip● $ go version
go version go1.11.2 darwin/amd64

@jared2501
Copy link
Contributor Author

If you're not keen to downgrade the suggested version, no worries, I can use the replace direct and depend on my fork until go 1.12 comes out and then move over.

@fsouza
Copy link
Contributor

fsouza commented Feb 21, 2019

@jared2501 oh interesting. We can downgrade, but if the Go docs are telling the truth, the build is failing for some other reason and Go is trying to guess it's because of the language version? Is that code open source?

@fsouza
Copy link
Contributor

fsouza commented Feb 21, 2019

(and if I have to guess, I'd go with golang/go#29278, which will likely require you to upgrade to Go 1.11.4)

@fsouza
Copy link
Contributor

fsouza commented Feb 21, 2019

Reopening as we wait for more info.

@fsouza fsouza reopened this Feb 21, 2019
@jared2501
Copy link
Contributor Author

Ah nice one @fsouza, that was it!

@jared2501
Copy link
Contributor Author

I upgraded to go 1.11.5, and could build v1.1.0 successfully

@fsouza
Copy link
Contributor

fsouza commented Feb 22, 2019

Cool, thanks for confirming! It sucks that go swallows the original error message though, so let's keep go 1.11 in the mod file for now and v1.1.1.

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

No branches or pull requests

3 participants