Skip to content
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

Scaladoc ignores package objects of otherwise empty packages #8124

Open
scabug opened this issue Jan 7, 2014 · 7 comments
Open

Scaladoc ignores package objects of otherwise empty packages #8124

scabug opened this issue Jan 7, 2014 · 7 comments

Comments

@scabug
Copy link

scabug commented Jan 7, 2014

Scaladoc does not appear to produce any documentation for doc-commented package objects whose packages contain no other top-level entities. For example, a package of top-level functions, all defined in the package object, is not shown at all in the Scaladoc output.

@scabug
Copy link
Author

scabug commented Jan 7, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8124?orig=1
Reporter: Jeffrey Schwab (jeff)
Affected Versions: 2.10.3, 2.11.8, 2.12.1

@scabug
Copy link
Author

scabug commented Jan 11, 2014

@som-snytt said:
One idea:
scala/scala#3353

@scabug
Copy link
Author

scabug commented Dec 1, 2014

Andrzej Giniewicz (giniu) said:
Any news on that one? To generate documentation for macros packages I had to change package object into object to make it appear at all, but it isn't ideal solution.

@sjrd
Copy link
Member

sjrd commented Jul 2, 2017

Still broken in Scala 2.12's new Scaladoc. See for example the doc at https://www.scala-js.org/api/scalajs-library/1.0.0-M1/scala/scalajs/js/index.html, where the subpackage js.special is completely absent from the documentation.

FTR, its source is here: https://github.com/scala-js/scala-js/blob/master/library/src/main/scala/scala/scalajs/js/special/package.scala

@ruippeixotog
Copy link
Member

After some debugging, it seems that scaladoc is ignoring package objects here when it shouldn't. However, (naively) removing the aSym.isPackageObject condition makes scaladoc exit with a stack overflow.

@VladUreche, can you point me out to where in the code should I be looking? Should I try to make a special case here for a package object with no "class/object" contents here? I don't know at all the scaladoc architecture, but I may be able to find a fix if you help me :)

@som-snytt
Copy link

@ruippeixotog I don't remember my approach, but I intervened earlier, it seems. Since I submitted a PR, it must have been close but no cigar.

@haifengl
Copy link

haifengl commented Apr 1, 2020

Any plane to get this bug fixed? This situation is quite common when we create a DSL on top of Java library. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants