-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8303884: jlink --add-options plugin does not allow GNU style options to be provided #19987
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
Conversation
|
👋 Welcome back ysuenaga! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
Hello @YaSuenag, I haven't had a chance to build your change locally and try it myself, but I suspect this change isn't enough to address the issue. Does this change allow for: to work correctly and have the Additionally, do the current tests pass with your proposed change? |
It would not work.
I tested this patch with |
JDK-8303884 was created to track a much larger re-examination of the jlink option parameter. I think the issue will need more thought before deciding whether to put in a short term fix as proposed here (the main concern is the side effect on plugins). |
|
So how should we proceed this? This problem is critical for some modularized applications as I said before. I agree that we need to consider the approach for this, but it is worth to provide the fix even if it is short-term, I think. I believe we can ensure not to break current behavior with jtreg tests. |
|
Hello @YaSuenag, like Alan noted, I believe the options parsing for jlink will need a bigger change. The current proposed change has the potential to have unexpected side effects where an option that wasn't expected to be passed to a plugin for parsing, might now end up being passed to the plugin. The fact that the current tests aren't catching that issue is also a sign that we might need additional test coverage in this area.
Do you have an example |
|
@jaikiran <argument>--add-options</argument>
<!--
add-option does not accept argument which stats with '\-\-',
so HeapDumpOnOutOfMemoryError is added to the top of args to avoid it.
-->
<argument>-XX:+HeapDumpOnOutOfMemoryError --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=perfreader --add-exports=jdk.internal.jvmstat/sun.jvmstat.perfdata.monitor=perfreader</argument>We cannot pass |
|
@YaSuenag This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@YaSuenag This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
|
The proposed fix is correct in my opinion, but there is a chance that user mistake could lead to missing of desired arguments. |
We cannot pass GNU style options like
--enable-previewtojlink --add-option. It is hard to use for complex application.We have workaround for this issue (see JBS), but I think it is better to fix on JDK side.
Progress
Warning
8303884: jlink --add-options plugin does not allow GNU style options to be providedIssue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19987/head:pull/19987$ git checkout pull/19987Update a local copy of the PR:
$ git checkout pull/19987$ git pull https://git.openjdk.org/jdk.git pull/19987/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19987View PR using the GUI difftool:
$ git pr show -t 19987Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19987.diff
Webrev
Link to Webrev Comment