My main concern is that since we are still supporting JDK 8, building the
docs with JDK 11 can bring about actual legitimate usability concerns in
terms
of consistency because we still have to build the main source code with JDK
8
but with docs we have to build with JDK 11 and so if we do this change we
have a situation where if someone starts sbt with JDK 8 (because they are
developing normally with the source code) and then do docs/paradox they will
get hit with runtime bytecode mismatch errors.

Now this can be solved with the the source and target flags i.e.

javacOptions ++= Seq("-source", "1.8", "-target", "1.8")

Which instructs the JVM to target JDK 1.8 but there are limitations here
i.e.
the fact that it doesn't work sun.misc.unsafe[1].

There is also the other issue which is well, the compiled docs would be
slightly
misleading in the sense that they would link against the JDK 11 docs when
in reality
our projects support JDK 8 and these docs do actually differ (JDK8 docs
differ
to JDK11 docs). At this point one might bring up Pekko core as a counter
example (i.e. that we compile Pekko) with JDK 11 but this is also due to
technical reasons. It would actually be ideal to compile core with JDK 8 and
use multi-release-jar to explicitly compile the parts that need later JDK's
but
sbt doesn't support that properly yet.

I mentioned this somewhere (can't remember where) but it would actually be
ideal
if another release of sbt-paradox from the older series i.e. 0.9.x so it
can be
deployed to the newer repositories.

Alternately we figure out a way to support multi-release-jar but this may
take a while.

[1]:
https://github.com/apache/incubator-pekko/blob/bcec7c0fa0cd9f68c4858d168f0dfadcb3ba4602/project/JdkOptions.scala#L71-L82


On Wed, Jan 31, 2024 at 2:48 AM PJ Fanning <fannin...@apache.org> wrote:

> We have a slightly untidy sbt plugin setup in our various Pekko repos,
> where we force the use of old Paradox plugins so that we can use Java
> 8 for doc building.
>
> Now that we have the 1.0.x releases done, can we consider switching to
> the latest Paradox plugins and live with the fact that that means we
> need to use Java 11 for doc builds?
>
> Matthias Kurz has been publishing some new versions of these plugins
> because the versions that we use are not in Maven Central meaning that
> we are dependent on the scala-sbt repository.
>
> Any objections to us at least starting with the Pekko repos where we
> have 1.0.x branches? We can update the main branches in these repos to
> use the latest Paradox plugins and update the build docs.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@pekko.apache.org
> For additional commands, e-mail: dev-h...@pekko.apache.org
>
>

-- 

Matthew de Detrich

*Aiven Deutschland GmbH*

Immanuelkirchstraße 26, 10405 Berlin

Alexanderufer 3-7, 10117 Berlin

Amtsgericht Charlottenburg, HRB 209739 B

Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen

*m:* +491603708037

*w:* aiven.io *e:* matthew.dedetr...@aiven.io

Reply via email to