Skip to content

Don't manipulate bin scripts for jruby/ruby #17

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

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

headius
Copy link
Collaborator

@headius headius commented Jul 21, 2025

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.
@headius headius requested a review from eregon July 21, 2025 19:28
@headius
Copy link
Collaborator Author

headius commented Jul 21, 2025

The relevant changes were released in JRuby 10.0.1.0, so all dev/head builds should have picked up the bin changes long ago. This job has been failing for some time.

@eregon
Copy link
Member

eregon commented Jul 21, 2025

Looks good, but have you seen ruby/setup-ruby#781 (comment) ?
It seems jruby.exe is missing or something like that.

EDIT: so I think it might fail the same way here too on Windows

@eregon
Copy link
Member

eregon commented Jul 21, 2025

FYI I just pushed 7c7bcb3 since windows-2019 is gone (same as ruby/ruby-builder@228ee88 but on this repo)

@eregon
Copy link
Member

eregon commented Jul 21, 2025

I'll merge this as it's definitely a good change, and dev builds here are broken currently anyway.
I think it will make it easier to experiment with a fix for ruby/setup-ruby#781 (comment) too (I guess that needs a fix in JRuby).

@eregon eregon merged commit b3ce8c0 into ruby:master Jul 21, 2025
@eregon
Copy link
Member

eregon commented Jul 21, 2025

Interesting, dev builds are fine on Windows and there is jruby.exe there:
https://github.com/ruby/jruby-dev-builder/actions/runs/16426443478/job/46417804334#step:8:286

I suspect the problem is then that the default tar in PATH on Windows in GitHub Actions is broken in https://github.com/ruby/ruby-builder/actions/runs/16365805938/job/46242634106#step:10:3 and omits jruby.exe when there is jruby.bat or something like that (I recall seeing this once in the past)
and OTOH C:\windows\system32\tar.exe is fine and behaves correctly (that's the reason we use it in this repo).
I'll try that in ruby-builder then.

Yep, that's MSP-Greg/setup-ruby#1 (comment)

@headius headius deleted the no_binscript_tweaks branch July 21, 2025 19:47
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.

2 participants