On Sun, 28 Jul 2024 06:24:38 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:

>> We cannot pass GNU style options like `--enable-preview` to `jlink 
>> --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.
>
> 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.

> This problem is critical for some modularized applications as I said before.

Do you have an example `jlink` command line where you are running into problems 
with the `--add-options`? As far as I know, there are workarounds to get 
`--add-options` to behave correctly and be able to pass along the expected 
values in the generated image. Depending on your example, we might be able to 
suggest a workaround until the options parsing is reworked.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19987#issuecomment-2255205235

Reply via email to