Skip to content

Invalid Go toolchain version #2868

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

Closed
stevehipwell opened this issue Apr 23, 2025 · 3 comments
Closed

Invalid Go toolchain version #2868

stevehipwell opened this issue Apr 23, 2025 · 3 comments

Comments

@stevehipwell
Copy link

AFAIK since Go 1.24 using the format go 1.N (e.g. go 1.24) in go.mod is a valid alias for the latest version but when this pattern is used without the toolchain directive being explicitly set in the go.mod we're getting the "Invalid Go toolchain version" error.

Image

@redsun82
Copy link
Contributor

👋 @stevehipwell

You are right, that is even valid from 1.23 onward (see this comment). We have a draft PR addressing that, but we haven't picked it up in some time. We're discussing picking it up again 👍

@stevehipwell
Copy link
Author

Thanks for the reply @redsun82, I think it'd be good if this was fixed as it's currently misleading. I don't think this is the case but could you also confirm if this could be related to #2515?

redsun82 pushed a commit to github/codeql that referenced this issue Apr 24, 2025
This diagnostic was introduced by #15979.
However in the meantime the Go team [has backtracked](golang/go#62278 (comment))
on their decision, which leads to confusing alerts for user (e.g. github/codeql-action#2868).
Even using Go toolchains from 1.21 to 1.22 we weren't immediately able
to reproduce the problem that this diagnostics was meant to guard
against. Therefore it was deemed simpler to just remove it.

_En passant_ the `Makefile` now accepts `rtjo` not being set.
@redsun82
Copy link
Contributor

@stevehipwell after an internal discussion we decided to drop this alert entirely, which was done in github/codeql#19370. This will be released in version 2.21.2 which should get released at the end of next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants