-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: Updates to Go 1.23 #399
Conversation
@@ -20,8 +20,7 @@ jobs: | |||
- name: lint | |||
uses: golangci/golangci-lint-action@v6.1.0 | |||
with: | |||
version: v1.57.1 | |||
args: --timeout=10m |
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.
time-out moved to linter config file
@@ -75,7 +75,8 @@ linters: | |||
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. [fast: false, auto-fix: false] | |||
# Upstream code intentionally have number of non exhaustive checks | |||
# - exhaustive # check exhaustiveness of enum switch statements [fast: false, auto-fix: false] | |||
- exportloopref # checks for pointers to enclosing loop variables [fast: false, auto-fix: false] | |||
# - exportloopref # checks for pointers to enclosing loop variables [fast: false, auto-fix: false] |
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.
changed because:
WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.
exclude-rules: | ||
- linters: | ||
- gocritic | ||
text: "^builtinShadow: shadowing of predeclared identifier: (min|max)" |
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.
added because errors like:
Error: admin/model_index_options.go:65:6: builtinShadow: shadowing of predeclared identifier: max (gocritic)
var max int = 180
^
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.
From the readme
Note that atlas-sdk-go only supports the two most recent major versions of Go.
@gssbzn sorry I don't understand your comment in this context |
if you change the version in the go.mod, consumers need to also update to 1.23 and we would drop support to 1.22 which we shouldn't |
go.mod
Outdated
@@ -1,6 +1,6 @@ | |||
module go.mongodb.org/atlas-sdk/v20240805004 | |||
|
|||
go 1.22.0 | |||
go 1.23 |
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.
1.23 is not a valid version see golang/go#62278
@gssbzn oh, i see, that's why I was asking AKO so we have to be always in one version previous to the latest version? |
But consumers is not only AKO, see https://github.com/mongodb/atlas-sdk-go/network/dependents?package_id=UGFja2FnZS01MjgxMDY5MDM1 |
Description
Updates to Go 1.23
Ticket: CLOUDP-276354
Type of change:
Required Checklist:
make fmt
and formatted my codeFurther comments