fix(launcher): correct parsing of java release files under Bash/msys2 etc on Windows#9127
Merged
headius merged 3 commits intojruby:masterfrom Dec 10, 2025
Merged
Conversation
chadlwilson
commented
Dec 9, 2025
chadlwilson
commented
Dec 9, 2025
Member
|
Pinging @mrnoname1000 to help review this and offer suggestions! |
chadlwilson
added a commit
to chadlwilson/jruby
that referenced
this pull request
Dec 10, 2025
…suffixes As discussed in jruby#9127 (comment) this isn't perfect; however gets closer to the internal compatibility matching the JVM seems to do when loading JSAs at https://github.com/openjdk/jdk21u/blob/3c0530fd5f9615941144d8ac89786ce699027b51/src/hotspot/share/cds/filemap.cpp#L1341-L1349 (JDK 21) Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
4aaaadd to
8bf8958
Compare
…A suffixes As discussed in jruby#9127 (comment) this isn't perfect; however gets closer to the internal compatibility matching the JVM seems to do when loading JSAs at https://github.com/openjdk/jdk21u/blob/3c0530fd5f9615941144d8ac89786ce699027b51/src/hotspot/share/cds/filemap.cpp#L1341-L1349 (JDK 21) Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
shellcheck treats the shell=dash designation as indication to only care about dash rules; however IntelliJ idea will still highlight it as an issue. We are probably better to only suppress the relevant rule. Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
…release metadata Windows Temurin builds (for example) use CRLF in their `release` file; which breaks unquoting and thus the rest of the script. Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
8bf8958 to
4cee12a
Compare
Member
|
Proceeding with merge! Thank you! |
chadlwilson
added a commit
to chadlwilson/jruby
that referenced
this pull request
Dec 10, 2025
…A suffixes As discussed in jruby#9127 (comment) this isn't perfect; however gets closer to the internal compatibility matching the JVM seems to do when loading JSAs at https://github.com/openjdk/jdk21u/blob/3c0530fd5f9615941144d8ac89786ce699027b51/src/hotspot/share/cds/filemap.cpp#L1341-L1349 (JDK 21) Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com> (cherry picked from commit 250080a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Eclipse Temurin files have CRLFs on Windows which breaks the parsing and unquoting here.
Notes
.jruby.java_optsin the non-module JVM case seems to work fine as-is, because it splits on whitespace anyway (which also means it doesn't work for any args with intentional whitespace in them anyway; quoted or unquoted in the file); but I aligned theIFS=to isolate from the environment and do things consistently anyway.--environmentin future.JAVA_RUNTIME_VERSIONcorrectly as intended per conversation in fix(launcher): correct parsing of java release files under Bash/msys2 etc on Windows #9127 (comment)Example 1 (Temurin x64 on Windows, with CRLF)
Example 2 (Microsoft aarch64 on Windows, with CRLF)