feat: multi-platform portable-ruby toolchains#377
Merged
Conversation
sushain97
approved these changes
Jun 3, 2026
| def _emit_alias(name, hub_name, platforms): | ||
| branches = [] | ||
| for plat in platforms: | ||
| branches.append( |
Collaborator
There was a problem hiding this comment.
Could we build up branches as a dict and then use repr below to minimize the manual formatting?
Member
Author
There was a problem hiding this comment.
I personally like to see properly formatted BUILD files, even if we autogenerate them. I've cleaned up the implementation to use templates and the existing join_and_indent utility function, though. It looks like this now https://gist.github.com/p0deje/8a7c7a6ba59c906ab181ef59587c8044.
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.
Replaces the single-platform
@rubyrepo (downloaded for the Bazel client's host) with proper Bazel toolchain resolution across{x86_64,arm64}_linuxand{x86_64,arm64}_darwinwhenportable_ruby = True. Per-platform repositories are lazily fetched and registered as separatetoolchain()entries withexec_compatible_withconstraints.A new hub repo at
@rubyaliases the canonical targets (:bundle, :gem, :ruby, :headers, :jars, :dist_files, etc.) viaselect()so existing references like@ruby//:bundlekeep working. This unblocks remote execution (EngFlow, BuildBuddy RBE) where the client and exec platforms differ. Activated automatically whenportable_ruby = True.JRuby remains a fully cross-platform toolchain without any constraints.
ruby-build/TruffleRuby/RubyInstaller/system remain single-platform.