Skip to content

Provide DefaultInfo on Go toolchain rules#4373

Merged
fmeum merged 1 commit intomasterfrom
sdk-default-info
Jun 9, 2025
Merged

Provide DefaultInfo on Go toolchain rules#4373
fmeum merged 1 commit intomasterfrom
sdk-default-info

Conversation

@fmeum
Copy link
Copy Markdown
Member

@fmeum fmeum commented Jun 8, 2025

What type of PR is this?

Feature

What does this PR do? Why is it needed?

This makes it easier to deal with these toolchains in language-agnostic aspects and helpers (in particular, bazel_env.bzl), that propagate to toolchain targets.

Even though genrules now support toolchain_types in their toolchains, this does not allow Go SDKs to be used in genrules as they don't expose the path to the Go binary via a Make variable. This is intentional as we don't want to allow running go in genrules.

Which issues(s) does this PR fix?

Other notes for review

This makes it easier to deal with these toolchains in language-agnostic aspects and helpers (in particular, bazel_env.bzl), that propagate to toolchain targets.

Even though genrules now support `toolchain_type`s in their `toolchains`, this does *not* allow Go SDKs to be used in genrules as they don't expose the path to the Go binary via a Make variable. This is intentional as we don't want to allow running `go` in `genrule`s.
@fmeum fmeum force-pushed the sdk-default-info branch from c1ef1b2 to f288346 Compare June 8, 2025 14:08
@fmeum fmeum merged commit 0aa693d into master Jun 9, 2025
4 checks passed
@fmeum fmeum deleted the sdk-default-info branch June 9, 2025 15:27
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.

2 participants