jlink SystemModulesPlugin use of hashCode breaks reproducibility

Alan Bateman Alan.Bateman at oracle.com
Tue Sep 21 07:21:14 UTC 2021


On 20/09/2021 12:07, Craig Raw wrote:
> Sure - I'm using the Gradle badass-jlink-plugin. The command it is 
> executing is:
>
> /Users/craigraw/.sdkman/candidates/java/16.0.1.hs-adpt/bin/jlink -v 
> --strip-debug --compress 2 --no-header-files --no-man-pages 
> --ignore-signing-information --exclude-files **.png 
> --exclude-resources glob:/com.sparrowwallet.merged.module/META-INF/* 
> --module-path 
> /Users/craigraw/.sdkman/candidates/java/16.0.1.hs-adpt/jmods/:/Users/craigraw/git/sparrow/build/jlinkbase/jlinkjars 
> --add-modules com.sparrowwallet.sparrow --output 
> /Users/craigraw/git/sparrow/build/image
>
> I've had no experience with JDK 17 yet - I'm specifying that users 
> build with a constant version (JDK 16 at present) to maintain 
> reproducibility with jpackage.
>
I see you've figured jimage extract so extract the classes/resources. 
Would it be possible to make available the SystemModules$default.class 
and SystemModules$all.class files from two runs of the above that 
produce non-identical class files?

-Alan


More information about the jigsaw-dev mailing list