-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use Go 1.21 for golangci-lint #26786
Conversation
At least https://hub.docker.com/r/gitea/test_env/tags |
As the future of |
Somehow the tests didn't caught a deprecation error, but running
The |
That would require us to bump minimum go version to 1.21 it seems. I think we can do this on Also, wonder why the deprecation did not show on CI. Ideally we should probably update |
As of 1.21, the version in go.mod becomes the strict minimum requirement, so it will always lag everywhere else by 1 minor version.
|
I think fixing it now may still be fine, since |
Ah, yes in that case we can keep 1.20 minimum. I thought it was only available with 1.21. |
@harryzcy could you raise a PR that fixes the deprecation on main branch? |
In PR #26786, the Go version for golangci-lint is bumped to 1.21. This causes the following error: ``` models/migrations/v1_16/v210.go:132:23: SA1019: elliptic.Marshal has been deprecated since Go 1.21: for ECDH, use the crypto/ecdh package. This function returns an encoding equivalent to that of PublicKey.Bytes in crypto/ecdh. (staticcheck) PublicKey: elliptic.Marshal(elliptic.P256(), parsed.PubKey.X, parsed.PubKey.Y), ``` The change now uses [func (*PublicKey) ECDH](https://pkg.go.dev/crypto/ecdsa#PublicKey.ECDH), which is added in Go 1.20.
We were missing a number of config files like `.golangci.yml` in the dependencies for the pull request pipelines, which resulted in the linting not running for #26786 because only `.golangci.yml` had changed.
* giteaofficial/main: Use `Set[Type]` instead of `map[Type]bool/struct{}`. (go-gitea#26804) Fix verifyCommits error when push a new branch (go-gitea#26664) Fix Uint8Array comparisons and update vitest (go-gitea#26805) Add various missing files-changed dependencies (go-gitea#26799) Improve flex list item padding (go-gitea#26779) Include the GITHUB_TOKEN/GITEA_TOKEN secret for fork pull requests (go-gitea#26759) feat(API): add route and implementation for creating/updating repository secret (go-gitea#26766) Replace deprecated `elliptic.Marshal` (go-gitea#26800) Updating the js libraries to latest version. (go-gitea#26795) Fix some slice append usages (go-gitea#26778) Use Go 1.21 for golangci-lint (go-gitea#26786) Fix notification circle (border-radius) (go-gitea#26794) Fix context filter has no effect in dashboard (go-gitea#26695) Add default label in branch select list (go-gitea#26697) Remove redundant nil check in `WalkGitLog` (go-gitea#26773) Remove fomantic `item` module (go-gitea#26775) Update info regarding internet connection for build (go-gitea#26776) Fix being unable to use a repo that prohibits accepting PRs as a PR source. (go-gitea#26785)
No description provided.