Native launcher appears to hang on GHA when the JDK version is too
old for JRuby 10. This bypasses it and should be a bit lighter. It
will also avoid any variability in the launcher used, since Unixes
and Windows already use different executables.
Apparently this exec errors when the subprocess fails rather than
returning an error code. This causes the whole setup process to
terminate. This patch catches the error and uses that to indicate
failure to launch.
* JRuby 10 requires Java 21. Since the previous default was 17 and all JRuby releases should work fine on 21, we do this for all JRuby installs.
* Implements #718
**What does this PR do?**
This PR provides the final piece of the puzzle to fix#682: now that
ruby-dev-builder is building `3.4-asan` Rubies since
https://github.com/ruby/ruby-dev-builder/pull/15, we can make them
available for use.
**Motivation:**
At Datadog, we're using ASan builds to check for issues
[in our library](https://github.com/datadog/dd-trace-rb),
and having a `3.4-asan` build improves the experience of having
these checks be a required CI step. Using the ASan builds built from
ruby-head means our CI could break because of unrelated issues/changes
from ruby-head.
**Additional Notes:**
`yarn` was trying really hard to update a bunch of things, which
generated A LOT of diff noise. I've manually pared them down just
to the actual changes related to adding the new variant so the
diff makes a bit more sense.
**How to test the change?**
I've already tested this in
https://github.com/DataDog/dd-trace-rb/actions/runs/13392865620/job/37696781848
and it seems to be working fine!
If set up `rubygems: latest` in workflow,
it will cause the error with Ruby 3.0 because the latest rubygems does not support Ruby 3.0.
Ref. https://rubygems.org/gems/rubygems-update
### Error message
```
Updating RubyGems
/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem --version
3.2.33
Default RubyGems version is 3.2.33
Updating RubyGems to latest version
/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem update --system
ERROR: Error installing rubygems-update:
rubygems-update-3.6.1 requires Ruby version >= 3.1.0. The current ruby version is 3.0.7.220.
ERROR: While executing gem ... (NoMethodError)
undefined method `version' for nil:NilClass
Updating rubygems-update
Took 2.86 seconds
Error: The process '/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem' failed with exit code 1
```
### How to reproduce
```
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
rubygems: latest
```
* Remove the ASan Debugging section for now as it seems mostly redundant.
Native extensions are automatically compiled with ASan, so there is nothing special to do to use it.