Skip to content
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

Add new setting //go/toolchain:sdk_name to allow the selection of a specific Go toolchain #4242

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

bluec0re
Copy link
Contributor

What type of PR is this?

Feature

What does this PR do? Why is it needed?

This commit adds a new setting
--@io_bazel_rules_go//go/toolchain:sdk_name which can be used to select a registered Go toolchain via the name provided in go_download_sdk, go_wrap_sdk, etc.

This fixes the problem of selecting a toolchain where the same Go version is used, but different experiements are enabled or patches applied.

Which issues(s) does this PR fix?

Fixes #4240

Other notes for review

Works also as a workaround for #3582

…pecific Go toolchain

This commit adds a new setting
--@io_bazel_rules_go//go/toolchain:sdk_name which can be used to select
a registered Go toolchain via the name provided in go_download_sdk,
go_wrap_sdk, etc.

This fixes the problem of selecting a toolchain where the same Go
version is used, but different experiements are enabled or patches
applied.

Fixes bazel-contrib#4240
go/private/go_toolchain.bzl Show resolved Hide resolved
go/private/go_toolchain.bzl Outdated Show resolved Hide resolved
@fmeum fmeum merged commit 9bc9acc into bazel-contrib:master Jan 31, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

How can a specific sdk be selected for builds and tests?
2 participants