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 @groups only work if there is more than one group #10078

Closed
scabug opened this issue Nov 28, 2016 · 2 comments
Closed

Scaladoc @groups only work if there is more than one group #10078

scabug opened this issue Nov 28, 2016 · 2 comments

Comments

@scabug
Copy link

scabug commented Nov 28, 2016

When I put all members of a package in the same group, the @group is ignored.

/** @group foo */
object Bar

/** @group foo */
class Baz

same-group

I expect that there is one group, "foo", that contains both "Bar" and "Baz". Instead, there are the default groups "Type Members" and "Value Members".

I did some more experiments: When I put the members in different groups, they are shown correctly:

/** @group foo */
object Bar

/** @group other */
class Baz

different-groups

When I put only one of them in a group, both are shown correctly:

ungrouped

@scabug
Copy link
Author

scabug commented Nov 28, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10078?orig=1
Reporter: Tillmann Rendel (toxaris)
Affected Versions: 2.12.0
Attachments:

@Lacaranian
Copy link

I'll take a peek at this one!

Lacaranian added a commit to Lacaranian/scala that referenced this issue Oct 15, 2017
In the special case that every member of a package used the same group
annotation, Scaladoc would ignore the group. This was due to filtering
that checked the number of extant groups (including the default
"Ungrouped" group), skipping groups if only one group was found.
Unfortunately, the "Ungrouped" group could be missing if all templates
used the same group!

Fix this by filtering out the "Ungrouped" group entirely, and checking
for the existence of any other groups. Make the solution a bit less
fragile by referencing the default group constant defined in
ModelFactory, rather than the default group's string directly.
Lacaranian added a commit to Lacaranian/scala that referenced this issue Oct 15, 2017
In the special case that every member of a package used the same group
annotation, Scaladoc would ignore the group. This was due to filtering
that checked the number of extant groups (including the default
"Ungrouped" group), skipping groups if only one group was found.
Unfortunately, the "Ungrouped" group could be missing if all templates
used the same group!

Fix this by filtering out the "Ungrouped" group entirely, and checking
for the existence of any other groups. Make the solution a bit less
fragile by referencing the default group constant defined in
ModelFactory, rather than the default group's string directly.
@SethTisue SethTisue modified the milestones: Backlog, 2.12.5 Oct 24, 2017
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

3 participants