Skip to content

Fix mdoc doobie for Scala 3 #651

@fedefernandez

Description

@fedefernandez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions