Repository navigation
feat: alias each platform's toolchain in the proxy repository - #452
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
The `<name>_toolchains` proxy repository now also has one `alias()` per platform, named after the platform, that points at the toolchain target of that platform's repository. A module can declare its own `toolchain()` targets on top of them, for example with `target_settings`, instead of registering `//:all`. Fixes bazel-contrib#451
TrapsterDK
added a commit
to devhusdk/rules_dx
that referenced
this pull request
Nov 28, 2026
…les_ruby The rules_dx extension still creates @dx_ruby_toolchains, but rules_dx now registers its own toolchain() targets from @dx_toolchains//ruby, typed by //ruby:toolchain_type and pointing at the per-platform aliases that bazel-contrib/rules_ruby#452 adds to the proxy repo. rules_ruby's //ruby:toolchain_type becomes an alias of ours, so its rules still resolve. The gate patch and the dx_hub_builds copy of the proxy BUILD are no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvdpJxYihWhnWtH8yv
TrapsterDK
added a commit
to devhusdk/rules_dx
that referenced
this pull request
Nov 28, 2026
…les_ruby (#14985) The rules_dx extension still creates @dx_ruby_toolchains, but rules_dx now registers its own toolchain() targets from @dx_toolchains//ruby, typed by //ruby:toolchain_type and pointing at the per-platform aliases that bazel-contrib/rules_ruby#452 adds to the proxy repo. rules_ruby's //ruby:toolchain_type becomes an alias of ours, so its rules still resolve. The gate patch and the dx_hub_builds copy of the proxy BUILD are no longer needed. Claude-Session: https://claude.ai/code/session_01Xut2hvdpJxYihWhnWtH8yv Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
TrapsterDK
force-pushed
the
toolchain-proxy-aliases
branch
from
November 28, 2026 12:35
8412409 to
d7d9b62
Compare
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.
Fixes #451.
Change
rb_toolchain_repository_proxynow writes onealias()per platform next to eachtoolchain(). The alias is named after the platform (:x86_64_linux,:arm64_darwin, ..., or:defaultin single-platform mode) and points at@<name>_<platform>//:toolchain. A module can then declare its owntoolchain()targets on top of@ruby_toolchains//:<platform>, for example withtarget_settings, withoutuse_repoof every per-platform repository.ruby/private/toolchain/repository_proxy.bzl: the BUILD content comes from a newproxy_build_content()function, which also writes the aliases. The rule doc describes them.register_toolchains("@ruby_toolchains//:all")is unchanged. Wildcard registration skips the aliases because they are nottoolchain()targets.Testing
ruby/tests/repository_proxy_tests.bzlchecks the aliases in multi-platform and single-platform mode. This is the regression test.@ruby_toolchains//:all, so the CI jobs that use them cover the registration.Assisted by Claude.