textidote: install (and then test/run) supports openjdk 24 #221845
Merged
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.
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?It appears that #221584 doesn’t fully cover openjdk 24 support in this formula. Specifically,
bin.write_jar_script
does not pass throughJAVA_OPTS
from the environment to the wrapper scripttextidote
- it only respectsJAVA_HOME
.The relevant implementation is shown below:
This behavior means that even if users set
JAVA_OPTS
globally, the JVM options won’t be picked up when launchingtextidote
. As a workaround, we can follow the pattern in #221709 by explicitly adding the necessary JVM options to the finalexec
call within the generated wrapper script.Additionally, to avoid errors like
JAXP00010004
caused by changes in openjdk 24 (wherejdk.xml.totalEntitySizeLimit
was set to 100,000), adding the JVM option to override the default size limit may be necessary.To provide better flexibility and avoid similar issues in the future, I believe that
bin.write_jar_script
should include logic similar tobin.env_script_all_files
, which reads theJAVA_OPTS
environment variable. This would allow users to have more control over their JVM options, helping them manage such configurations based on their specific needs.