-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
feat: go1.21.0 support (invalid Go version: "1.21.0") #1431
Comments
If it were to be corrected, it would need to be corrected here go-tools/analysis/lint/lint.go Line 219 in bc75918
|
Fixed. A new patch release will be made tomorrow. |
@dominikh I think the dots should be escaped: regexp.MustCompile(`^(?:go)?1\.(\d+).*$`) |
@ldez You'd be correct, and I don't know how that slipped through — at some point it was escaped… It's not a big issue, though. The regex is already very lax, mostly being used to parse versions that have already been validated by Go during our use of go/packages. I'll fix it for the release, but it should work fine for the moment. |
Go versions in go.mod files can now look like "go1.21rc5" or "go1.21.0". See https://go.dev/doc/toolchain#versions. Closes: gh-1431 (cherry picked from commit ac367e4)
Some make targets were failing with "invalid Go version". This issue was reported and fixed in staticcheck's official repo several months ago: dominikh/go-tools#1431 This commit also changed the way the module is invoked in Makefile to not need to include this dependency as a dependency in go.mod.
feature request
I need to allow version syntax
1.N.P
problem
Since go 1.21.0,
go mod init
generates the following go.mod:If I run staticcheck in this state, I get the following error:
FYI: https://go.dev/doc/toolchain#versions
my environment
The text was updated successfully, but these errors were encountered: