On Fri, 17 Jul 2026 15:54:32 GMT, Severin Gehwolf <[email protected]> wrote:
>> I did not correctly express what I wanted to say in regard to:
>> ` if (defaultStripDebugPlugin != null &&
>> !seenPlugins.contains(EXCLUDE_FILES_NAME)) {`
>> let me try again.
>>
>> In case of:
>> `$ jlink --exclude-files=**/bin/java --strip-debug --add-modules java.base
>> --verbose --output ./build/java.base.jdk`
>>
>> `seenPlugins` will contain `EXCLUDE_FILES_NAME` and will not disable the
>> --strip-debug internal exclude.
>>
>> But in case of :
>> `$ jlink --strip-debug --add-modules java.base --verbose --output
>> ./build/java.base.jdk`
>>
>> the `.debuginfo` files are no longer excluded. As far as I understand
>> `seenPlugins` only contains "by default enabled" plugins and therefore does
>> not contain exclude-files if it is not on the commandline. Because of this,
>> I guess that the additional list is needed to detect the disabled plugin.
>
> Ah, yes. `seenPlugins` are plugins explicitly seen on the CLI and not
> disabled explicitly. In case of `--strip-debug` only `exclude-files` won't be
> there. Thanks for the clarification. This is pretty messy :-/
Actually, I don't like using "--disable-plugin=exclude-files" as a fallback for
the old behavior (the way it is currently documented in the draft CSR).
Wouldn't it make more sense to add an option to --strip-debug to suppress file
exclusions? Or, even don't add anything at all? The fallback for not excluding
external debug info files in --strip-debug would be to explicitly call the
desired combination of "--strip-java-debug-attributes" and
"--strip-native-debug-symbols=". I doubt that this is needed anywhere, anyway...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31690#discussion_r3604653566