-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify version of Java targeted by the tools #921
Comments
Parts a tla2tools.jar should still work with Java 1.8. |
If an execution does not use the |
Users can put their own version of |
All right well an issue is we won't be able to add |
Can you explain why Java is more strict on Windows? This sounds strange given that Java's main feature is platform independence. |
Well it's a compile-once-run-anywhere thing so any artifacts we compile will run on windows just fine, but the actual act of compilation is I guess different enough that actually trying to run the ant build on windows will fail with "unable to find jdk.jfr package" errors. Maybe there's a workaround but I wasn't able to find it other than specifying |
This must be a local issue because compilation on Windows used to work when the CI (including UI tests) still ran on Azure Pipelines. At any rate, let's make a conscious/explicit decision to break (partial) 1.8 compatibly, instead of as a side-effect of turning warnings into errors. A message to the TLA+ Google group could, perhaps, answer if some users are still on 1.8. |
I posted here: https://groups.google.com/g/tlaplus/c/BReLjG8ako4 If we go through with this change I suggest bumping the minor version so nightly releases are uploaded to a separate release from where they're uploaded now. |
Welcome to the Java Ecosystem! 😅 What you've described is not a best practice, but it is a practice, and a remarkably common one. It works well for features that can be enabled/disabled at run-time. Since AFAIK there's no flag or environment variable to disable
The right (?) way to support those users is to ship a multi-release jar:
|
It should be confirmed that OSGi (the Toolbox) correctly handles such a multi-release.jar. That said, https://metabase.tlapl.us/dashboard/1 does not indicate Java 8 users. |
Recent versions of OSGi do support multi-release jars c. 2018, but the toolbox might be using an older version that doesn't. (I don't know enough about OSGi to tell.) If dropping Java 8 support is an option, it seems like the best one. I won't miss it. :) |
No replies to the google group posting after a week. I don't know how long we ought to wait. Should we make the switch now? If it breaks for somebody then we can look at doing a multi-release jar. |
Mention it one more time at next week's community meeting? |
Currently our Java version story is a bit out of focus:
compile
target of the ant build, thesource
andtarget
are set to1.8
, aka Java 8jdk.jfr
API, which became public in Java 9; however we are using the Java 11 version (which causes build issues on windows, see Build failure on Windows: package jdk.jfr does not exist #914)So is it just Java 11 then? We should switch to specifying the
release="11"
parameter to the antjavac
task instead of thesource
andtarget
parameters? Because currently we are declaring that the tools are compatible with Java 8 which is not true and produces the "bootstrap class path not set in conjunction with -source 8" warning during compilation.The text was updated successfully, but these errors were encountered: