Skip to content

Go: remove invalid toolchain version diagnostics #19370

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Apr 24, 2025

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 Makefile now accepts rtjo not being set.

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.
@github-actions github-actions bot added the Go label Apr 24, 2025
@redsun82 redsun82 marked this pull request as ready for review April 24, 2025 13:51
@Copilot Copilot AI review requested due to automatic review settings April 24, 2025 13:51
@redsun82 redsun82 requested a review from a team as a code owner April 24, 2025 13:51
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for taking care of this!

@redsun82 redsun82 merged commit 21170a1 into main Apr 24, 2025
15 checks passed
@redsun82 redsun82 deleted the redsun82/go-remove-invalid-toolchain-diagnostic branch April 24, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants