fd4s / fs2-kafka

Functional Kafka Streams for Scala
https://fd4s.github.io/fs2-kafka
Apache License 2.0
296 stars 101 forks source link

Plugin dependencies under `sbt-typelevel` umbrella #1297

Closed aartigao closed 9 months ago

aartigao commented 9 months ago

On mdoc execution issue

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

πŸ‘†πŸ½ 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 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.