-
-
Notifications
You must be signed in to change notification settings - Fork 925
Pregenerate bin/ruby and bin/ruby.bat #8875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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 |
That sounds good. |
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. |
Shouldn't this also be merged on master and maybe tested there first? |
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 ??? |
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:
***@***.***>
|
dcc3992
to
524b5fe
Compare
@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. |
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
I think only option 1 is viable. Option 2 would mean that the Option 3 would not be backward compatible with older JRuby releases that don't redirect It might also be possible to get the |
524b5fe
to
7b5a66e
Compare
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 |
7b5a66e
to
050ce2b
Compare
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.
050ce2b
to
8bbeec6
Compare
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. |
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 ofjruby
.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)