Latest mdoc is compiled with JDK 11 but our GHA publish job was configured to use JDK 8:
[info] running fs2.kafka.docs.Main
Error: Exception in thread "sbt-bg-threads-1" java.lang.UnsupportedClassVersionError: mdoc/MainSettings$ has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
By switching the order of githubWorkflowJavaVersions the issue should be fixed, because the first JDK defined (in the case of this PR, JDK 21) is the one used for the publish job. I'm pretty sure that this doesn't affect anything else because we're only using a newest JVM to run but the release flag is set to JDK 8, thus compiled bytecode will be compatible with old Java versions.
The build job still runs in JDK 8 and JDK 21, so we can be confident that we're compatible with old codebases and also with latest ones (by using the latest LTS).
On sbt-typelevel usage
I've removed the redundant dependencies already defined by sbt-typelevel.
Also, this is the first step to use sbt-typelevel-site for publishing the website. This first iteration only uses the transitive mdoc and everything else stays the same (Docusaurus), but we're now in a good position to use the standard typelevel way for websites.
On
mdoc
execution issueLatest
mdoc
is compiled with JDK 11 but our GHA publish job was configured to use JDK 8:ππ½ See this run log for the full error.
By switching the order of
githubWorkflowJavaVersions
the issue should be fixed, because the first JDK defined (in the case of this PR, JDK 21) is the one used for the publish job. I'm pretty sure that this doesn't affect anything else because we're only using a newest JVM to run but the release flag is set to JDK 8, thus compiled bytecode will be compatible with old Java versions.The build job still runs in JDK 8 and JDK 21, so we can be confident that we're compatible with old codebases and also with latest ones (by using the latest LTS).
On
sbt-typelevel
usageI've removed the redundant dependencies already defined by
sbt-typelevel
.Also, this is the first step to use
sbt-typelevel-site
for publishing the website. This first iteration only uses the transitivemdoc
and everything else stays the same (Docusaurus), but we're now in a good position to use the standard typelevel way for websites.