-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Upgrade golang to v1.16 #3233
Upgrade golang to v1.16 #3233
Conversation
#3235 should help fix the failing tests. |
The tests are showing a behavior change when there is a reference to a package that has been renamed. In the test we are expecting that
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Aside: https://github.com/thepwagner/action-update-dockerurl supports the Dockerfile
syntax we're using for this dependency, and https://github.com/thepwagner/action-update-brewformula/blob/main/brew/golang.go is gnarly, but handles parsing https://golang.org/dl/?mode=json - we could automate these bumps!
I'd dig some tests that cover the new retract
directive too, e.g. to ensure Dependabot won't propose an update to a retracted version. As noted, there are a lot of module goodies in 1.16
.
Allows use of the new embed feature.
Previously this error was only occuring with `go mod tidy` and was being ignored. With go 1.16 the error is triggered during `go get` so we need to handle it again. Distinguishing the error from GitDependenciesNotReachable also took some extra effort. The error message has changed from: github.com/dependabot/vgotest imports github.com/googleapis/gnostic/OpenAPIv2: module github.com/googleapis/gnostic@latest found (v0.5.1), but does not contain package github.com/googleapis/gnostic/OpenAPIv2 to: github.com/dependabot/vgotest imports github.com/googleapis/gnostic/OpenAPIv2: cannot find module providing package github.com/googleapis/gnostic/OpenAPIv2 We now use `go list` to check that github.com/googleapis/gnostic is a reachable repo/module.
I pushed an update to fix the failing test that is worth re-reviewing: f94051a. The issue is that |
@thepwagner: I added a test that we won't strip the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to update the extracted go module code to get the latest behavior updates there.
I assumed since 0.4.1 included golang/mod@c0d644d#diff-320fe6a1bc7a6321d706e6c7fc95d457cd5ea1b13425b320d56897c78074b350 , we'd have the necessary bits to update the helpers.
Aha! I had been hoping that |
This allows use of the new embed package added in 1.16.
There's also a few notable updates for modules:
We could omit
GO111MODULE=on
from the helper scripts.