Skip to content

Download and include in dist CRuby's rdoc data#9052

Merged
headius merged 3 commits intojruby:masterfrom
headius:rdoc_in_dist
Nov 3, 2025
Merged

Download and include in dist CRuby's rdoc data#9052
headius merged 3 commits intojruby:masterfrom
headius:rdoc_in_dist

Conversation

@headius
Copy link
Member

@headius headius commented Oct 31, 2025

This change does the following:

  • Download the CRuby rdoc data published by Debian.
  • Unpack and include that data in the build of jruby-dist.

This logic uses antrun and is hardcoded to the specific URL of the ruby3.4-doc package from Debian. It depends on the "ar" and "tar" commands being available on the host system.

Fixes #9049

@headius headius added this to the JRuby 10.0.3.0 milestone Oct 31, 2025
@headius
Copy link
Member Author

headius commented Oct 31, 2025

Note this obviously adds some size to the dist tarball (and a similar amount to the zip):

$ ls -l maven/jruby-dist/target/jruby-dist-10.0.3.0-SNAPSHOT-bin.tar.gz
-rw-r--r--  1 headius  staff  36726626 Oct 31 12:23 maven/jruby-dist/target/jruby-dist-10.0.3.0-SNAPSHOT-bin.tar.gz

vs

$ ls -l maven/jruby-dist/target/jruby-dist-10.0.3.0-SNAPSHOT-bin.tar.gz         
-rw-r--r--  1 headius  staff  34066463 Oct 31 12:29 maven/jruby-dist/target/jruby-dist-10.0.3.0-SNAPSHOT-bin.tar.gz

So that's like 2.6MB or so.

This PR also requires #9051 in order for the dumped RI data to be readable by JRuby.

@headius
Copy link
Member Author

headius commented Oct 31, 2025

Updated version uses FTP to download the sole "doc" file from Debian's Ruby 3.4 artifact directory, since this filename may change over time.

It would be nice to remove the dependency on the ar and tar commands, but there does not appear to be any support for ar in any Ant tasks and both unpack commands would require additional Ruby dependencies not published with the jruby-maven-plugin.

This change does the following:

* Download the CRuby rdoc data published by Debian.
* Unpack and include that data in the build of jruby-dist.

This logic uses antrun and is hardcoded to the specific URL of the
ruby3.4-doc package from Debian. It depends on the "ar" and "tar"
commands being available on the host system.

Fixes jruby#9049
This is more robust than hardcoding the filename, since it's
possible for that filename to change with new releases.
@mrnoname1000
Copy link
Contributor

ar is POSIX, tar is ubiquitous, and tar -C is available on all the implementations I checked. So those dependencies shouldn't be an issue outside of hyper minimalist systems

@headius
Copy link
Member Author

headius commented Nov 3, 2025

Last change is pushed, to remove CRuby-specific bits of the ri data.

@headius headius marked this pull request as ready for review November 3, 2025 15:31
@headius headius merged commit 5e54e5f into jruby:master Nov 3, 2025
73 of 74 checks passed
@headius headius deleted the rdoc_in_dist branch November 3, 2025 15:31
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.

ri docs are not available for core

2 participants