47degrees/memeid

Fix mdoc doobie for Scala 3

fedefernandez opened this issue · 0 comments

We're currently compiling mdoc with Scala 2. When trying to compile the documentation using Scala 3, the build fails with the following error

error:
Exception occurred while executing macro expansion.
java.lang.NullPointerException
	at doobie.util.PosPlatform$.originImpl(PosPlatform.scala:21)

info: Compiled in 20.61s (1 error)
[error] java.lang.RuntimeException: mdoc failed
[error] 	at scala.sys.package$.error(package.scala:27)
[error] 	at mdoc.SbtMain$.main(Main.scala:30)
[error] 	at mdoc.SbtMain.main(Main.scala)
[error] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] stack trace is suppressed; run last microsite3 / Compile / runMain for the full output
[error] (microsite3 / Compile / runMain) mdoc failed
[error] Total time: 35 s, completed Feb 2, 2023, 11:03:25 PM

Since mdoc is run on the SBT context, even though the syntax and dependencies are adapted to Scala 3, the runtime is Scala 2, but this is a hypothesis.