-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
use javac --release, java8 minimum version #899
Conversation
Here, I don't understand why you suppress java 8 from |
the flag does not exist in java8, it would error out. building with java11 or java17 will give a java8 binary as we desire. contrary to the source/target flags it REALLY checks the old api and fails. if not matched, as we saw by setting --release 7 compiling with java17. the workflow runs for 17 are a little pointless with this pull request, as they compile a java8 binary. i am planning a pull request so the java compiler version can be passed as parameter, so java17 will be able to build a java17 binary again. just to make sure the compatibility stays high as it is now. does this make sense? |
Yes, it makes sense and sounds fine to me. In the mean time, you may fix the conflict I've caused by merging the other pull request (sorry about that...) Thanks for your help! |
We discussed
We support running on 8, so we should test it. Whether we compile with 8 is a separate question. The GH workflow tries to support two things:
The workflow mixes together Perhaps we could change the workflow to this: jobs:
build:
# Using the newest LTS Java on Ubuntu, create a potentially releasable jar (compile, test, sign)
matrix:
# Test the jar from "build" job
# Also javac, jar, test (to support "2")
release:
# Release the JAR from "build" job (maybe as snapshot) |
javac since java9 has a new flat --release to build a binary which can be run with an older java. the public API of that older release must be followed as well. the flags used before, -source, -target do not do this. therefor it got unnoticed that plantuml did not compile and run in java7 any more, despite beeing compiled for for java7. plantuml#898
fixes #898, and 2 issues:
the cost of using the --release flag is that build environments must muse java11+. but we can be sure, it runs for 8 this time :)
i used the master branch on the fork to produce executables in case you want to test beforehand:
https://github.com/soloturn/plantuml/releases