-
Notifications
You must be signed in to change notification settings - Fork 734
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 to go 1.21.9 #3855
Merged
Merged
Upgrade to go 1.21.9 #3855
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
478b7a4
to
622d1c6
Compare
1bc4d74
to
2eb962d
Compare
bruce-riley
previously approved these changes
Apr 16, 2024
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.
Thanks for doing this!!
evan-gray
previously requested changes
Apr 16, 2024
bruce-riley
previously approved these changes
Apr 17, 2024
evan-gray
requested changes
Apr 17, 2024
evan-gray
previously approved these changes
Apr 17, 2024
pires
reviewed
Apr 18, 2024
barnjamin
reviewed
Apr 18, 2024
barnjamin
previously approved these changes
Apr 18, 2024
evan-gray
approved these changes
Apr 19, 2024
Ran via: go get github.com/quic-go/[email protected]
Ran via: go get go.mongodb.org/mongo-driver@latest
Ran via: go get github.com/libp2p/[email protected] Refs: #3863
Run via: go mod tidy This updates the go.sum and removes unnecessary indirect references.
Except for wormchain.
This was done with scripts/update-go-version.sh
This was done with scripts/update-go-version.sh
This was done with scripts/update-go-version.sh
This is a little helper to make updating the version of go a bit nicer.
* set the default docker command to "dokcer" * update the comment for the humongous sed command for dockerfiles
* Upgrade golangci-lint to a version built with go 1.21.x. The older version was a binary version built with go 1.20.x and it was failing against the newer code built with go 1.21.x * print the golangci-lint version in each run to see what version of go it was built with in case there are incompatibilties during the next upgrade * remove the linter config skipping over pkg/supervisor entirely and instead put in an override to ignore the `unused` linter for the pkg/supervisor testhelpers bits for unsed test functions necessary to satisfy the test interface.
Because 1.52.2 is built with go 1.20.x which has issues with this project now that it is upgraded to 1.21.8.
Caught by an upgraded golangci-lint with the gosec linter: ::medium file=node/pkg/watchers/evm/connectors/batch_poller.go,line=226,col=8::G601: Implicit memory aliasing in for loop. (gosec) ::medium file=node/pkg/watchers/evm/connectors/batch_poller.go,line=285,col=8::G601: Implicit memory aliasing in for loop. (gosec) ::medium file=node/pkg/watchers/evm/connectors/batch_poller_test.go,line=128,col=37::G601: Implicit memory aliasing in for loop. (gosec) See also: https://husni.dev/beware-of-implicit-memory-aliasing-in-go-foor-loop/
Automated via: scripts/update-go-version.sh 1.21.9
Otherwise things get really sad.
* Standardized on prefacing functions with `function` for consistency * Added a few more comments to explain how things work * Automatically increment the go version and toolchain in go.mod * Standardized on prefacing functions with `function` for consistency * Make the go image debian version a variable for ease of maintenance
Review feedback from @pires
Required after running go mod edit or it refuses to build.
Running `go mod tidy` removes the toolchain so the build works.
bruce-riley
approved these changes
Apr 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was a fair bit more painful than expected.
Changes
Huge shoutout to @pires and @bruce-riley for some help with this.