XChart
XChart copied to clipboard
CI with Java 8
- The project claims compatibility with Java 8.
- Yet our only CI in PRs executes against Java 11: https://github.com/knowm/XChart/blob/develop/.github/workflows/maven_on_pull_request.yml#L20 Thus we risk bringing in something which won't work with Java 8.
I suggest to add CI check using Java 8.
The good thing is that current develop
seems to pass with Java 8 when tested locally.
EDIT: actually code formatting fails:
[ERROR] Failed to execute goal com.spotify.fmt:fmt-maven-plugin:2.19:format (default) on project xchart-parent: Execution default of goal com.spotify.fmt:fmt-maven-plugin:2.19:format failed: Unable to load the mojo 'format' in the plugin 'com.spotify.fmt:fmt-maven-plugin:2.19' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/spotify/fmt/FMT has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.spotify.fmt:fmt-maven-plugin:2.19
But still - maybe the library works in Java 8, just some dev tool for code formatting doesn't.
From https://github.com/spotify/fmt-maven-plugin#using-with-java-8
Using with Java 8 Starting from version 1.8, Google Java Formatter requires Java 11 to run. Incidently, all versions of this plugin starting from 2.10 inclusively also require this Java version to properly function. The 2.9.x release branch is the most up-to-date version that still runs on Java 8.
yes, we should add a CI check using Java 8. Also yes, I recall the constraint on the formatter. Maybe we just leave it at 2.9.x.
Yeah. Downgrading to 2.9.1
of the format plugin adds a lot of changes like
(99 files)
Currently I am thinking about:
- sticking with Java 8 as the library dependency
- using the latest of the format plugin
- making the CI run in two modes: Java 11 (as is) and Java 8 (which would use Java 11 to build and just Java 8 to run tests).
The main point of the formatter is to have a standard where all committers use so that merge diffs are best readable. That's really the only reason. We can remove all the author comments as well.