Go: remove invalid toolchain version diagnostics#19370
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the invalid toolchain version diagnostic and its associated tests, in response to updated Go team guidance. The changes eliminate the diagnostic logic from the integration tests, project code, and CLI while updating function calls accordingly.
- Removed tests and source files associated with the invalid toolchain version diagnostic.
- Deleted the related diagnostic function from the diagnostics package.
- Updated calls to LoadGoModules to use the new signature without the emitDiagnostics flag.
Reviewed Changes
Copilot reviewed 6 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go/ql/integration-tests/diagnostics/invalid-toolchain-version/test.py | Removed test cases for invalid toolchain version diagnostics |
| go/ql/integration-tests/diagnostics/invalid-toolchain-version/src/main.go | Removed source file related to invalid toolchain version diagnostics |
| go/extractor/project/project_test.go | Eliminated tests for the invalid toolchain version check |
| go/extractor/project/project.go | Removed diagnostic logic and helper functions for invalid toolchain version checking |
| go/extractor/diagnostics/diagnostics.go | Deleted EmitInvalidToolchainVersion diagnostic function |
| go/extractor/cli/go-autobuilder/go-autobuilder.go | Updated LoadGoModules calls to match the new function signature |
Files not reviewed (6)
- go/Makefile: Language not supported
- go/ql/integration-tests/diagnostics/invalid-toolchain-version/build_environment.expected: Language not supported
- go/ql/integration-tests/diagnostics/invalid-toolchain-version/diagnostics.expected: Language not supported
- go/ql/integration-tests/diagnostics/invalid-toolchain-version/src/go.mod: Language not supported
- go/ql/integration-tests/go-version-bump/diagnostics.expected: Language not supported
- go/ql/integration-tests/resolve-build-environment/newer-go-needed/diagnostics.expected: Language not supported
mbg
approved these changes
Apr 24, 2025
Member
mbg
left a comment
There was a problem hiding this comment.
LGTM - thanks for taking care of this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This diagnostic was introduced by #15979. However in the meantime the Go team has backtracked on their decision, which leads to confusing alerts for users (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
Makefilenow acceptsrtjonot being set.