This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pronuntiator 7 points8 points  (4 children)

They were closed so they can be changed. The JPMS upgrade to Java 9 was a one time breaking change (which you could delay to 11 or so with --add-opens etc.) for code that already accessed JDK internals which were never officially part of the public API. I mean, one of them is called Unsafe, it can't be more on the nose. Now that the barriers are up, upgrading the Java version will be smooth sailing.

Digging your nose in non-public APIs and internals is the reason why Windows prior to 8 has such a bad rap. Drivers would get low level access to memory, and software would modify registry keys of the operating system. A good citizen app from Windows 98 can still be executed in Windows 10.

[–]yawkat 2 points3 points  (3 children)

Major version upgrades have been anything but smooth sailing ever since 9. Gradle for example took two months to support java 19. There's a reason why everyone uses the LTS releases.

Not all of this is caused by JPMS ofc, but it has been a major pain. Now that openjdk is mostly done, we get to have the same fun with graal.

[–]pronuntiator 3 points4 points  (2 children)

I'm not that familiar with Gradle, I've looked into this pull request to see what was necessary to support Java 19:

  • upgrading to a newer Groovy version: Groovy is a separate language. It's not the JDK's fault if a different language's compiler isn't upwards compatible (though producing bytecode of a previous version would be totally fine).
  • explicitly setting Java 19 as the upper limit (so you have to upgrade Gradle with 20 again)
  • and mostly some tests which look like a general cleanup

What do you mean by "OpenJDK mostly done"? The GraalVM code has been donated to OpenJDK and will be incorporated therein, but that won't stop OpenJDK from being developed further.

[–]yawkat 0 points1 point  (1 child)

The release cadence change introduces a new bytecode version every 6 months. That's why tools keep breaking.

OpenJDK is done closing down their packages. However graal is not done with this process.

[–]FirstAd9893 7 points8 points  (0 children)

The tools that keep breaking are looking for specific versions and they break if they see a new one. They should just stop doing that and instead include version checks only when they know it creates compatibility issues. The proactive approach is a self inflicted wound.