-
Notifications
You must be signed in to change notification settings - Fork 214
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
[Merged by Bors] - Bump Go to 1.22.2 #5580
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5580 +/- ##
=========================================
- Coverage 80.2% 80.2% -0.1%
=========================================
Files 285 285
Lines 29754 29738 -16
=========================================
- Hits 23883 23866 -17
Misses 4224 4224
- Partials 1647 1648 +1 ☔ View full report in Codecov by Sentry. |
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 shouldn't update to 1.22 yet.
Tools and libraries might not yet be compatible with it yet and we are not yet using any of its features.
I went through some of the codebase to check where we can update the code to actually use 1.22 improvements and its quite a bit (WIP: bump-go-1.22...golang-1.22-features)
The go-libp2p is a good point. We probably shouldn't update to go 1.22 until this issue is resolved: libp2p/go-libp2p#2706. What other tools and libraries block the upgrade?
Just because there are new functionalities in the language doesn't mean we should use them everywhere and upgrade the codebase in a single huge PR. I intentionally didn't change all |
I saw
True, but I still think that we should at least migrate code from |
Staticcheck required a bump and now passes. I haven't seen any issues with golangci-lint, the CI is clean 🤔. |
Try removing a syncer/find_fork_test.go:7: File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/spacemeshos/go-spacemesh) (gci)
"math/rand/v2"
syncer/find_fork_test.go:13: File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/spacemeshos/go-spacemesh) (gci)
"go.uber.org/mock/gomock"
...
activation/nipost_test.go:1156:19: loopclosure: loop variable tc captured by func literal (govet)
PublishEpoch: tc.epoch, Both of which are false positives 🙂 |
The loop variable false positive is already fixed in golangci-lint v1.56.2. The gci false-positive should be fixed in the next release of golangci-lint (it's already fixed on their master branch). Summing up, we need to wait for:
|
@fasmat go-libp2p v0.33 which supports go1.22 was released already: https://github.com/libp2p/go-libp2p/releases/tag/v0.33.0 |
@poszu but the problem with |
No, there's no new version of golangci-lint yet. IMHO, bump to go1.22 shouldn't be blocked by that, we cannot use |
I don't think I understand. The goal of this PR is to update 1.22 and the argument to not wait for compatibility is because after upgrading to 1.22 we are still using 1.21? What is the point of upgrading then? 😅 |
The goal is to update the toolchain to go1.22, not to migrate the codebase to things new in 1.22. The toolchain can be bumped without any issues. Just the fact that some linter will falsely scream if you use a tiny subset of new features shouldn't block from upgrading the toolchain in my opinion. |
I don't understand. As you said we are not using any of the new features of 1.22 and don't plan on doing so in the near future; actually using some of them will also block merging PRs because of |
beside changes in language and stdlib, there are also regular improvements in golang runtime. so if we will compile with new toolchain we will benefit from them. that said there are also sometime regressions in newer versions, and i personally would wait until 2 or 3 patch release. |
@fasmat I bumped Go to 1.22.2. Do you think you could approve now? |
bors merge |
Merge conflict. |
bors merge |
Co-authored-by: Matthias <[email protected]>
Build failed: |
Systest logs are incomplete, can't tell what went wrong - retrying. bors retry |
Co-authored-by: Matthias <[email protected]>
Pull request successfully merged into develop. Build succeeded: |
Description
Go 1.22.0 release notes: https://tip.golang.org/doc/go1.22