| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This is an attempt to fix jruby/jruby-launcher#29 and workarounds that are apparently needed by setup-ruby and the jruby-dev-builder. It might also make sense to have bin/ruby exec bin/jruby or vice versa, rather than having three copies of the launch script, but the extra copies don't really hurt anything. |
Sorry, something went wrong.
|
That sounds good. |
Sorry, something went wrong.
Except this is to be merged into jruby-9.4, and you said you don't want to support head builds of jruby-9.4 in jruby-dev-builder. If that can be changed, I'm willing to help set it up. |
Sorry, something went wrong.
|
Shouldn't this also be merged on master and maybe tested there first? |
Sorry, something went wrong.
|
When we intend a fix to go into an earlier release, we merge there first and then merge forward to master for current releases. We do not merge backwards due to the large number of changes that happen on master, and cherry-picking changes makes future merges more difficult. It could be debated this change should not be applied to 9.4, though. @enebo ??? |
Sorry, something went wrong.
|
I think if this is simpler to test with master we should and just violate
our general policy and cp the change back. I think so long as both
versions are still going to be run by projects we should change in both.
…On Wed, Jun 25, 2025, 4:06 PM Charles Oliver Nutter < ***@***.***> wrote:
*headius* left a comment (jruby/jruby#8875)
<#8875 (comment)>
When we intend a fix to go into an earlier release, we merge there first
and then merge forward to master for current releases. We do not merge
backwards due to the large number of changes that happen on master, and
cherry-picking changes makes future merges more difficult.
It could be debated this change should not be applied to 9.4, though.
@enebo <https://github.com/enebo> ???
—
Reply to this email directly, view it on GitHub
<#8875 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAE226SW445SSFGSCPE5OD3FMFLXAVCNFSM6AAAAACAEKFSSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBWGE2DMNZZG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry, something went wrong.
|
@enebo Ok, I've rebased on current master. I'll deploy it as a snapshot and test it in my fork of jruby-dev-builder. |
Sorry, something went wrong.
From jruby/jruby#8875: * The bash script is now always installed as both `jruby` and `ruby`, so copying or linking is unnecessary. * We now include in our distribution a `ruby.bat` so creating that is unnecessary.
This modifies our bin/ruby script to be exactly the same as the bin/jruby.sh script, in order to avoid shipping symlinks in our dist archives. This also avoids traversing a symlink when running the `ruby` command instead of `jruby`. This also introduces bin/ruby.bat that relaunches from bin/jruby.exe. These fixes are intended to avoid requiring workarounds as described in jruby/jruby-launcher#29 here: jruby/jruby-launcher#29 (comment)
|
Tested successfully here, with a snapshot made from this branch: https://github.com/headius/jruby-dev-builder/actions/runs/15914550995/job/44889507971 I did think of an issue with having both bin/jruby and bin/ruby be a full launcher: jruby-launcher only overwrites bin/jruby. So, options:
I think only option 1 is viable. Option 2 would mean that the bin/ruby executable would remain a shell script even after installing jruby-launcher, since only bin/jruby would be overwritten. It works with a symlink because the symlink just points at bin/jruby. Option 3 would not be backward compatible with older JRuby releases that don't redirect bin/jruby to bin/ruby. It might also be possible to get the bin/ruby symlink into the tarball, but that seems unreliable. |
Sorry, something went wrong.
|
I have made changes to support Option 1 above.
By having both aliases exec the master script, neither of them duplicate its contents. By installing the native executable to both places, neither will fail to work in shebang lines. We may want to consider encouraging people to use bin/ruby as their primary way to launch JRuby in the future, and modify RubyGems to use that in shebangs instead of bin/jruby. |
Sorry, something went wrong.
Rather than copying bin/jruby.sh to bin/jruby and bin/ruby during the build, it makes more sense to just ship scripts already in place that exec bin/jruby.sh. This makes that file the true main launcher, since even the native executable on unix now execs. Shell code provided by @mrnoname1000.
|
I'm re-pushing a snapshot without these changes to avoid breaking anyone using jruby-dev-builder nightlies, but I think almost everything is in place: This PR:
This eliminates the workarounds discussed in jruby/jruby-launcher#29.
I'm not going to mess with this too much more until we can discuss. |
Sorry, something went wrong.
In jruby/jruby#8875 we modified JRuby's distribution to always ship scripts for bin/jruby and bin/ruby: * bin/jruby and bin/ruby are versioned shell scripts that launch `/bin/sh bin/jruby.sh`. * bin/ruby.bat contains batch code to launch bin/ruby.exe. * No copying of scripts is done during the build and no tweaks are needed by installers to copy, link, or create additional bin/ commands. These changes now conflict with jruby-dev-builder's symlinking of bin/jruby to bin/ruby and its creation of bin/ruby.bat, so we remove the relevant steps.
In jruby/jruby#8875 we modified JRuby's distribution to always ship scripts for bin/jruby and bin/ruby: * bin/jruby and bin/ruby are versioned shell scripts that launch `/bin/sh bin/jruby.sh`. * bin/ruby.bat contains batch code to launch bin/ruby.exe. * No copying of scripts is done during the build and no tweaks are needed by installers to copy, link, or create additional bin/ commands. These changes now conflict with jruby-dev-builder's symlinking of bin/jruby to bin/ruby and its creation of bin/ruby.bat, so we remove the relevant steps.
| Back | FazBrowse Home | New Git URL |
This modifies our bin/ruby script to be exactly the same as the bin/jruby.sh script, in order to avoid shipping symlinks in our dist archives. This also avoids traversing a symlink when running the ruby command instead of jruby.
This also introduces bin/ruby.bat that relaunches from bin/jruby.exe.
These fixes are intended to avoid requiring workarounds as described in jruby/jruby-launcher#29 here:
jruby/jruby-launcher#29 (comment)