Cannot add package description in ScalaDoc (Scala 3)
Asked Answered
M

1

5

I cannot add a package description in ScalaDoc with Scala 3

/** package description */
package foo {
    /** some scaladoc comment */
    def method():A = ???
}

Then I generate the doc with sbt (1.5.3)

sbt> doc

I don't get the description of the package itself in the index.html file, but only the description of the method inside the package.

Moyers answered 13/6, 2021 at 11:28 Comment(1)
Maybe it is not possible anymore, as the scala 3 library do not use package comment, and package object is becoming deprecatedMoyers
M
6

I finally found the answer

Scaladoc comments can go before fields, methods, classes, traits, objects. For now, scaladoc doesn't support straightforward solution to document packages. There is a dedicated github issue, where you can check the current status of the problem.

https://github.com/lampepfl/dotty/issues/11284

Moyers answered 13/6, 2021 at 17:0 Comment(2)
I'm also interested in this issue, but the URL above is broken.Pargeting
@MichelCharpentier, I updated the link.Breeder

© 2022 - 2024 — McMap. All rights reserved.