Description
Reproduction steps
See https://github.com/mdedetrich/scaladoc-api-mappings-java-enum-bug
Problem
If you have a project that uses apiMappings
in sbt (i.e. doc / autoAPIMappings := true
) and you happen to have a scaladoc that points to a Java Enum value type, i.e. the underlying behavior when writing the file. If [[java.nio.file.StandardOpenOption.SYNC]]
then scaladoc will add a $
at the end of the enum type (in this example it would be StandardOpenOption$
) causing a broken link.
It appears that for some reason scaladoc is incorrectly treating this as a Scala object (which have the $
identifier at the end).
Note that although the actual base URL of https://docs.oracle.com/en/java/javase/11/docs/api/java.base/
is derived from https://github.com/ThoughtWorksInc/sbt-api-mappings, this shouldn't matter since it just sets apiMappings
which doesn't contain any logic, i.e. the plugin only specifics the base URL and that is it.
Scala 3 bug is here scala/scala3#17973