Do not install rdoc on JRuby - #315
Merged
Merged
Conversation
The JRuby CI rows fail during bundle install since 2026-09-01 (run 33509684792): rdoc 8 depends on rbs (>= 4.0.0), whose java-platform gem declares a jar dependency (org.snakeyaml:snakeyaml-engine), as does the psych 5.5.0 java gem pulled in by activesupport. Installing each triggers jar-dependencies' post-install hook, which lazily installs `ruby-maven (~> 3.9)` through a nested Gem::DependencyInstaller inside one of Bundler's parallel install workers. With two such gems installing at once, the nested install's RubyGems rdoc documentation hook runs a Dir.chdir block that collides with the other worker's chdir; MRI only warns about this, but JRuby raises (jruby/jruby#5649): RuntimeError: there was an error installing 'ruby-maven (~> 3.9)' . please install it manually: #<RuntimeError: conflicting chdir during another chdir block> rdoc is only used for the local documentation task, so move it to `platforms :ruby` as rsim/oracle-enhanced#2826 did: JRuby then resolves neither rdoc nor rbs, leaving psych as the only jar-vendoring gem, and the rbs pin added to avoid its C-extension build becomes unnecessary. Guard the Rakefile's rdoc task for rubies without the rdoc gem. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
The three JRuby rows (test, test_11g, test_11g_ojdbc11) fail during
Bundle installon master since 2026-09-01 (run 33509684792) and on #313 / #314:Same mechanism as rsim/oracle-enhanced#2826.
gem "rdoc"(development group) resolves to rdoc 8.0.0, which depends on rbs (>= 4.0.0); on JRuby that becomes rbs 4.2.1.pre.1-java (the>= 4.1.0.pre.2pin admits the prerelease), whose gemspec declares a jar dependency on org.snakeyaml:snakeyaml-engine. psych 5.5.0-java (released 2026-08-21, pulled in by activesupport) declares the same jar. Installing each one triggers jar-dependencies' post-install hook, which lazily installsruby-maven (~> 3.9)through a nestedGem::DependencyInstallerinside a Bundler parallel worker. With two such gems installing at once, the nested install's RubyGems rdoc hook (aDir.chdirblock) collides with the other worker's chdir. MRI only warns; JRuby raises (jruby/jruby#5649) andbundle installaborts.Fix
gem "rdoc"toplatforms :rubyand drop theplatforms :jrubyrbs pin. On JRuby the bundle then resolves neither rdoc nor rbs. psych 5.5.0-java remains (activesupport dependency), so one jar vendoring still runs on JRuby, the same as rsim/oracle-enhanced's JRuby rows since 2026-08-21.require "rdoc/task"with aLoadErrorrescue sorakestill loads without the rdoc gem.Verification
bundle lockwith JRuby 10.1.1.0 (universal-java): master resolves psych 5.5.0-java, rbs 4.2.1.pre.1-java and rdoc 8.0.0; this branch resolves psych 5.5.0-java only.bundle lockwith CRuby 4.0.6 still resolves rdoc 8.0.0 (with rbs 4.2.0 and psych 5.5.0).rakedefines rdoc, rerdoc, clobber_rdoc, rdoc:coverage and rdoc:server alongside spec, simplecov and default. Withrdoc/taskunloadable it defines spec, simplecov and default, where master's Rakefile raisesLoadError.After this is merged, rerunning #313 and #314 is expected to turn their JRuby rows green; their CRuby rows were only cancelled by fail-fast.