-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
v0.7.0 is failing with "invalid Go version: 1.22" when running via golangci linter #310
Comments
I think you need to raise this issue with golangci-lint. The panic does not appear to happen with the gofumpt binary at version v0.7.0, so it must be something that golangci-lint is doing in their custom code calling the gofumpt library. From a skim of golangci/golangci-lint@e24ef74 their code looks like it always adds the |
Indeed - the PR you show is you updating gofumpt to the release we did three days ago, but golangci-lint's latest release is a week old, so the two latest releases are incompatible right now. The easiest next step is for golangci-lint to do a release. I get that breaking changes can be annoying, but we used to accept a lax form of semver for Go versions, which was entirely incorrect - we must follow Go versions to get the right semantics, for example |
Hello, I already fixed the problem 3 days ago golangci/golangci-lint#4922 @mvdan You can close this issue. |
@yurishkuro you should not update golangci-lint dependencies outside of the official version of golangci-lint. |
Yes, the issue is with the release times, see my last comment :) Note that the change here happened over a month ago, so I didn't exactly push it at the last minute - there should have been some warning. 88a300b |
I'll leave this issue open for now because, from past experience, users will keep opening issues here until golangci-lint does another release. I'd rather keep this open for another week than have to close another two or three issues as duplicates. |
We are aware of changes only when a release happens, I cannot follow all the linter changes. |
Yep, understandable. FWIW I keep breaking changes to a minimum where I can. This was a rare exception as I explained above. |
From what I have read, now the official version has a better semver style (except for rc).
This means that
I also note that the vocabulary is not the same across the doc but I think we can get the idea. |
Yep, correct. Just note that Go versioning is different from semver in that Semver dictates |
But as |
Well, |
It seems not fully true: golang/go#65568 (comment) Code QL, when using at least go1.21, reports a warning: So yes you can still use it but some problems can happen because of that, so it is not really usable inside |
The vocabulary across the doc is a problem:
If I just read those docs, I can think that the The doc uses the terms "language version", "release family", "version syntax", "version", "release", and "released versions" to talk about the same topic, this creates confusion on where each element can be used. |
I will create a release tomorrow/today at about 8 pm UTC. |
https://github.com/golangci/golangci-lint/releases/tag/v1.60.2 happened four days ago as promised - closing this. |
Thank you all for swift resolution! 🚀 |
A bot tried to apply an upgrade of gofumpt and it started failing in the CI, raising panic in this line:
gofumpt/format/format.go
Line 99 in 86bffd6
The code that it's trying to lint is built with 1.23 toolchain but with 1.22 compatibility
The setup works fine with gofumpt v0.6.0. It also works fine if the main toolchain is 1.22 (i.e. if we let Go toolchain download 1.23 itself).
The text was updated successfully, but these errors were encountered: