-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bump Go (1.21.3), golangci-lint (1.55.1), fix go mod tidy
#557
Merged
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
Andrew7234
approved these changes
Nov 3, 2023
Andrew7234
reviewed
Nov 3, 2023
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.
oh ok I see the slack messages/CI now
mitjat
force-pushed
the
mitjat/fix-imports--chainhash
branch
3 times, most recently
from
November 3, 2023 05:25
dc42240
to
8155c6c
Compare
Ran `go1.21.3 mod tidy -go=1.21`
mitjat
force-pushed
the
mitjat/fix-imports--chainhash
branch
from
November 3, 2023 05:35
8155c6c
to
7fddb1c
Compare
mitjat
changed the title
Manually specify version of dependency github.com/btcsuite/btcd/chaincfg/chainhash
Bump Go (1.21.3), golangci-lint (1.55.1)
Nov 3, 2023
mitjat
force-pushed
the
mitjat/fix-imports--chainhash
branch
from
November 3, 2023 05:59
7fddb1c
to
dc6178b
Compare
ptrus
approved these changes
Nov 3, 2023
Additional data point: @peternose points out that oasis-core had the same issue in oasisprotocol/oasis-core#5268, and also resolved it by switching to a newer Go. |
mitjat
changed the title
Bump Go (1.21.3), golangci-lint (1.55.1)
Bump Go (1.21.3), golangci-lint (1.55.1), fix Nov 3, 2023
go mod tidy
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 PR:
go mod tidy
issues. Those were previously only checked-for in the release process, thus allowing us to check in code that would later fail to release.The backstory is a little convoluted:
go mod tidy
as a hook, which failed withA sort-of fix was to add an explicit dependency in an attempt to enforce a specific version:
go get github.com/btcsuite/btcd/chaincfg/chainhash@v1.0.1
. After this, nexus builds andgo mod tidy
is happy, but the latter also removes the chainhash entry from go.mod, and a second invocation ofgo mod tidy
fails. This smells buggy.It turns out that bumping the Go version resolves the buggy
go mod tidy
behavior. Go v1.21 is also used by oasis-core and @ptrus recently suggested we use it in nexus too, so it's a good idea to upgrade anyway. However, this also requires us to bump the linter version (the old linter does not support Go v1.21), which in turn requires us to resolve some new linter warnings. This PR does that.Developers: After this goes in, you might need to update your local env accordingly: