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
Build: Golang 1.20 upgrade. #5462
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5462 +/- ##
==========================================
- Coverage 55.63% 51.07% -4.56%
==========================================
Files 447 447
Lines 63405 63401 -4
==========================================
- Hits 35274 32384 -2890
- Misses 25751 28542 +2791
- Partials 2380 2475 +95
... and 147 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Also look at bumping https://github.com/algorand/go-algorand/blob/master/scripts/buildtools/versions for golangci-lint and golang.org/x/tools, perhaps gotestsum too |
Yeah, had bumped golangci-lint locally, been spending time putting in excludes or fixing minor issues. |
.golangci.yml
Outdated
confidence: 0.8 | ||
|
||
# In order to disable any default rules, you have to list out all rules you would like enabled. | ||
# We explicitly disable (vs omitting) rules to make it clear how we are diverging. |
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.
Why not just add the ones we don't like to the exclude-rules
section below? It seems like less work than checking the revive default rules list periodically to see if it changed?
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 wasn't clear you could finetune revive's sub-rules in exclude-rules and saw multiple PR discussions laying out that going off the beaten path overrode golangci's default config for revive (requiring a full lay out like so).
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.
Would you be willing to pull cce@a167659 ?
384c865
to
4896d8d
Compare
it looks ok to me gary |
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.
Nice to see this! HyperFlow is assessing what corresponding changes are needed among Jenkinsfiles and Dockerfiles in the CI repo.
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.
LGTM
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.
LGTM. CI-related changes, get_golang_version, and go.mod changes look good to me.
Other than formatting changes, I guess the other changes were also to support the new golang version that I saw in some files:
- Removing
.(uint64)
and.(int)
- Adding
[string]
Summary
Exactly what it sounds like; upgrade go-algorand to compile with Golang 1.20.5.
Note: Upon merge, developers need to re-run
./scripts/buildtools/install_buildtools.sh
to get updated versions of our buildtools.Test Plan
Existing unit/functional/integration tests all pass. Builds (on PR, nightly, etc) all function as intended.