Conversation
There was a problem hiding this comment.
Pull request overview
Updates the portable Ruby integration in rules_ruby to use bazel-contrib/portable-ruby releases, adding support for release “suffixes” (rebuilds like X.Y.Z-2) and updating the checksum source data accordingly.
Changes:
- Switch portable Ruby download URLs/platform naming from
jdx/rubytobazel-contrib/portable-ruby. - Add
portable_ruby_release_suffixplumbing through the module extension/toolchain registration and download rule. - Regenerate/reshape portable Ruby checksum data to be keyed by release suffix and add a “default suffix per version” mapping.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/generate_portable_ruby_checksums/generate_portable_ruby_checksums.sh | Updates checksum generation to target bazel-contrib/portable-ruby, adds --release-suffix, and generates suffix-keyed checksum data + default suffix mapping. |
| ruby/private/toolchain.bzl | Extends rb_register_toolchains() API with portable_ruby_release_suffix and updates docs for the new upstream. |
| ruby/private/portable_ruby_checksums.bzl | Replaces the flat checksum map with PORTABLE_RUBY_DEFAULT_SUFFIXES plus suffix-keyed PORTABLE_RUBY_CHECKSUMS. |
| ruby/private/download.bzl | Downloads portable Ruby from the new repo using {version}-{suffix} tags and resolves checksums using the new nested mapping. |
| ruby/extensions.bzl | Adds portable_ruby_release_suffix to the bzlmod tag schema and passes it through to registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tools/generate_portable_ruby_checksums/generate_portable_ruby_checksums.sh
Show resolved
Hide resolved
tools/generate_portable_ruby_checksums/generate_portable_ruby_checksums.sh
Show resolved
Hide resolved
tools/generate_portable_ruby_checksums/generate_portable_ruby_checksums.sh
Outdated
Show resolved
Hide resolved
9ddd7aa to
a4e34e0
Compare
a4e34e0 to
66c79e5
Compare
There was a problem hiding this comment.
Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@jdx any chance we could upstream to your repo, so new releases get a suffix rather than being overwritten? Mutable releases cause supply-chain security problems, not just under Bazel. |
Switch portable Ruby source from jdx/ruby to bazel-contrib/portable-ruby
New release source
{version}-{suffix}(e.g. 3.4.8-1)Platform naming alignment
arm64_darwin,x86_64_darwin)New
portable_ruby_release_suffixattributerb_register_toolchains, the tag class inextensions.bzl, and the downloader rulePORTABLE_RUBY_DEFAULT_SUFFIXESmap fromportable_ruby_checksums.bzlChecksum data restructured
PORTABLE_RUBY_CHECKSUMSis now a nested dict keyed by suffix, then artifact namePORTABLE_RUBY_DEFAULT_SUFFIXESmap added to track the default suffix per Ruby versiongenerate_portable_ruby_checksums.sh) updated to work with the new repo's API and release format; test data updated accordingly