Skip to content

Do not install rdoc on JRuby - #315

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:do-not-install-rdoc-on-jruby
Sep 9, 2026
Merged

Do not install rdoc on JRuby#315
yahonda merged 1 commit into
rsim:masterfrom
yahonda:do-not-install-rdoc-on-jruby

Conversation

@yahonda

@yahonda yahonda commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

The three JRuby rows (test, test_11g, test_11g_ojdbc11) fail during Bundle install on master since 2026-09-01 (run 33509684792) and on #313 / #314:

RuntimeError: there was an error installing 'ruby-maven (~> 3.9)' . please install it manually:
  #<RuntimeError: conflicting chdir during another chdir block>

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.2 pin 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 installs ruby-maven (~> 3.9) through a nested Gem::DependencyInstaller inside a Bundler parallel worker. With two such gems installing at once, the nested install's RubyGems rdoc hook (a Dir.chdir block) collides with the other worker's chdir. MRI only warns; JRuby raises (jruby/jruby#5649) and bundle install aborts.

Fix

  • Gemfile: move gem "rdoc" to platforms :ruby and drop the platforms :jruby rbs 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.
  • Rakefile: guard require "rdoc/task" with a LoadError rescue so rake still loads without the rdoc gem.

Verification

  • bundle lock with 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 lock with CRuby 4.0.6 still resolves rdoc 8.0.0 (with rbs 4.2.0 and psych 5.5.0).
  • Rakefile: with rdoc loadable, rake defines rdoc, rerdoc, clobber_rdoc, rdoc:coverage and rdoc:server alongside spec, simplecov and default. With rdoc/task unloadable it defines spec, simplecov and default, where master's Rakefile raises LoadError.
  • RuboCop: 2 files inspected, no offenses detected.

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.

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>
@yahonda
yahonda merged commit 3f7f18f into rsim:master Sep 9, 2026
20 checks passed
@yahonda
yahonda deleted the do-not-install-rdoc-on-jruby branch September 9, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant