Repository navigation
Conversation
p0deje
requested changes
Oct 4, 2026
p0deje
left a comment
Member
There was a problem hiding this comment.
@titusfortner Can you check what's wrong with CI?
titusfortner
force-pushed
the
c/rules-ruby-gem-push-runfiles-498a01
branch
from
October 6, 2026 18:50
a237b63 to
42a1c7a
Compare
Contributor
Author
|
The Windows failures were two pre-existing
|
p0deje
approved these changes
Oct 6, 2026
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.
Problem
rb_gem_pushonly adds the toolchain'sgemscript and the.gemfile to its runfiles, so the generated wrapper'srlocationof the interpreter comes up empty and the finalexec ruby|jruby gem push ...falls back to whatever is onPATH. With MRI this is masked by a system Ruby on most machines; with JRuby it fails outright:env(TruffleRuby'sOPENSSL_PREFIXandLANG, JRuby's WindowsJAVA_OPTS) and only applies the target'senvthroughRunEnvironmentInfo, so the documented$(location)expansion never runs and the generated script only works underbazel run.Seen in the SeleniumHQ/selenium nightly release: https://github.com/SeleniumHQ/selenium/actions/runs/35165684730
Solution
rb_binary: puttoolchain.filesin runfiles, passjava_binsoJAVA_HOMEresolves from runfiles under JRuby, mergetoolchain.env, and bake the env into the generated script.bazel run :gem-release -- --helpto the examples/gem CI matrix. It fails on every JRuby entry without this change.Verified in Selenium with the runfiles part applied as a patch: https://github.com/SeleniumHQ/selenium/actions/runs/35171062663/job/105043434920