Le mardi 27 février 2024, 18:33:43 CET sebb a écrit :
> On Tue, 27 Feb 2024 at 17:01, Benjamin Marwell <bmarw...@apache.org> wrote:
> > > Compiling for Java 8 with
> > > Java 17 -release 8 is not the same as compiling with javac from JDK 8.
> > > They do not produce the same byte code.
+1 that's a fact

> > > There is a need to compile *with* JDK 8, not just compile *for* JDK 8.
I'd also add: do you also expect to run the unit and integration tests with JDK 
8?
could running be decoupled from compiling?

> > 
> > And when would that be needed?
I'd say it's a question of taste/aversion to risk: I personally fully trust JDK 
17 --release 8 to not produce anything wrong against JDK 8, but some may not 
trust
That's why I personally would accept building with JDK 17 --release 8 but would 
like to run UT/ITs with JDK 8

> 
> Isn't that needed for reproducible builds?

simply no

one concrete example from so many, just picking a random one: plexus-utils, 
that targets Java 8 bytecode 
https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/plexus/plexus-utils/README.md

as you can see, some releases were done with JDK 11, some with JDK 17, some on 
*nix and others on Windows
Each is reproducible, even if the required environment to get the same binaries 
as the reference published to Maven Central for each is different

while at it, I'll add:
this does not mean that for each release, any environment different from the 
reference one gives a bad output;
it just gives a different binary that is expected to be functionnally 
equivalent = what we blindly trusted before we checked binaries



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to