-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider how to document packages when there's no package object #11284
Comments
Kotlin uses https://github.com/Kotlin/kotlin-examples/tree/master/gradle/dokka/dokka-gradle-example |
In https://contributors.scala-lang.org/t/dropping-package-objects-and-documentation/2942 I suggested we use README.md in the directory corresponding to the packages to do this, there were a few other proposals too. |
I guess one problem that I would have with a Markdown file, such as From that perspective, I would prefer the approach used by Java, as mentioned by Seth Tisue in the discussion link above, in which a ScalaDoc comment is placed before the package declaration in, say, |
Nothing prevents us from putting scaladoc tags in markdown files, in fact scala3doc already supports both markdown and wiki syntax in scaladoc comments. |
I accept that is possible to put Markdown in a ScalaDoc comment, but wouldn't there be issues putting ScalaDoc links and tags in a Markdown file? These files are not typically processed as ScalaDoc, so you would need to create (yet) another flavor of Markdown that includes ScalaDoc-style links and tags, right? For example, if you edited such Markdown files in an IDE, then it would need to know that it was a flavor that supports features of ScalaDoc. Also, it would confusing to browse the sources here on GitHub, GitLab, BitBucket, etc. which would fail to correctly parse any Markdown files containing ScalaDoc-specific syntax. A project with a Another problem I foresee is this: if the package documentation is in a Thoughts? |
I mean, I don't care that much, I just proposed using README.md so that it gets auto-displayed in github/gitlab, the scaladoc @foo tags would just be displayed as plain text which is good enough. |
I can implement Most straight forward solution is to have package fq name in the very first line. So for package
these READMEs are not available in TASTY, so everything would be convention to gather all files in What do you think about that @smarter @Facsimiler @romanowski @abgruszecki? |
We want to be able to generate documentation from already published artifacts. We also want to be able to view documentation in the REPL. This means that if we want to support those Perhaps the morally correct thing to do would be to use an XML processing directive like I guess there's also the matter that we may not want to collide with any resource files that a user needs to insert into the .jar. |
The problem is, every build tool should support our new convention to package these READMEs. Or should we support only sbt and assume that it is user responsibility to manage these READMEs be shipped in jars? |
Is it possible to just have a |
Note: package objects are not deprecated, we could just require a package object as the place to have package documentation?
The text was updated successfully, but these errors were encountered: