Closed sbrunk closed 1 year ago
Trying to isolate this further. The error is triggered when a Java method annotated with NoException
like this with a parameter
public native @NoException(true) DeviceType type();
is called from Scala code. But only if we run unidoc
on that code. Regular compilation and Scaladoc seems to be working fine.
Running sbt -debug
and then calling doc
(working) and unidoc
(failing) and on a minimized example (single minimal project) for comparison to get some clues.
Both call scaladoc with almost the same arguments now, but in the unidoc
call the classpath looks suspicious: We have javacpp-1.5.9 AND javacpp-1.5.4 on the classpath.
So this seems like a bad interaction with the sbt-javacpp
plugin which currently defaults to javacpp 1.5.4. We override that in commonSettings: javaCppVersion := "1.5.9
, which works for tasks like compile
and doc
, but apparantly not for unidoc
.
javaCppVersion
needs to be set on the aggregating root task to be picked up by unidoc for some reason.
With the Scala 3.3.0 upgrade we're running into a weird issue when running the unidoc plugin:
Downgrading to Scala 3.2.2 even with the other dependency updates fixes it.
Needs investigation to find the root cause. I've opened an issue in sbt-unidoc to see if someone there has an idea.