Hi ZK Devs,

With recent advancements in Java (since Java 9), it is now generally
no longer necessary to require that software be developed on an older
JDK in order to have confidence that it will run on the older version
of Java. This is because, as of Java 9, all JDK releases have better
support for cross-compilation to older Java versions.

What this means is that developers can confidently make the build
requirements for a project higher than the Java version that will
actually be supported at runtime.

In fact, ZooKeeper already supports the necessary flags in its Maven
build configuration to ensure that it uses JDK 8 compliance when
building on a newer JDK (I added this way back in ZOOKEEPER-3739 /
https://github.com/apache/zookeeper/pull/1269)

So, I propose that we make JDK 11 the new minimum version to *build*
ZooKeeper with. This would not change the runtime requirement, which
would remain at JDK 8.

The only necessary change to make this happen would be to add the
minimum Java version to the maven-enforcer-plugin (like
https://github.com/apache/accumulo/blob/438f0efd34ef9d200bc8c7ecdd11d5dedb146519/pom.xml#L1162-L1164)

This would allow ZooKeeper to to streamline its development process a
little bit by reducing the amount of CI testing that is done as part
of the build. In other words, we can drop the CI builds for JDK 8,
which saves on build resources and time. The return on investment is
so low for the JDK 8 builds anyway, because of the improved
cross-compilation in newer JDKs. So, there's not much value in
building on JDK 8 anyway.

Of course, I am only recommending this for *new* release lines,
starting with ZooKeeper 3.7.0/master branch, because I would not want
to change expectations for users who will build their own 3.5 and 3.6
versions as they continue to have patch versions released.

What do you think?

Kind Regards,
Christopher

Reply via email to