Skip to content

fix check_licenses GOTOOLCHAIN mismatch with go-licenses#464

Open
kahirokunn wants to merge 1 commit intoknative:mainfrom
kahirokunn:fix-check-licenses-gotoolchain
Open

fix check_licenses GOTOOLCHAIN mismatch with go-licenses#464
kahirokunn wants to merge 1 commit intoknative:mainfrom
kahirokunn:fix-check-licenses-gotoolchain

Conversation

@kahirokunn
Copy link
Copy Markdown
Member

@kahirokunn kahirokunn commented Apr 7, 2026

check_licenses() can fail when GOTOOLCHAIN=auto causes go-licenses to
be built with a different toolchain than the project, resulting in stdlib
packages being misidentified.

Fix by pinning GOTOOLCHAIN to $(go env GOVERSION) in check_licenses().

Pin GOTOOLCHAIN to the project's Go version in check_licenses() so
that go-licenses is compiled with the same toolchain as the project.
When GOTOOLCHAIN=auto (the go_run default), Go may select a different
toolchain to build go-licenses, causing its isStdLib() check to fail
with "does not have module info" errors for standard library packages.
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented Apr 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kahirokunn
Once this PR has been reviewed and has the lgtm label, please assign cardil for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot requested review from cardil and evankanderson April 7, 2026 11:51
@knative-prow knative-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant