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

fix(#19377): show inherited abstract members in dedicated section #19552

Merged

Conversation

i10416
Copy link
Contributor

@i10416 i10416 commented Jan 28, 2024

close #19377

Before this commit, inherited abstract members are displayed in "Inherited members" section, which made it a bit difficult for developers to figure out which method to be implemented.

I think there are two solution for the issue.

  1. display abstract modifier for methods in inherited section
  2. add a new dedicated section for inherited abstract members

I choose the 2nd solution because

  • it is easier for developers to find methods to be implemented in a dedicated section rather than to look up abstract ones from all the inherited members
  • it requires smaller modification to scaladoc codebase
image

Before this commit, inherited abstract members are displayed in
"Inherited members" section, which made it a bit difficult for
developers to figure out which method to be implemented.

I think there are two solution for the issue.

1. display `abstract` modifier for methods in inherited section
2. add a new dedicated section for inherited abstract members

I choose the 2nd solution because

- it is easier for developers to find methods to be implemented in a dedicated section rather than to look
  up abstract ones from all the inherited members
- it requires smaller modification to scaladoc codebase
@@ -323,6 +323,7 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
val (allInherited, allDefined) = nonExperimental.partition(isInherited)
val (depDefined, defined) = allDefined.partition(isDeprecated)
val (depInherited, inherited) = allInherited.partition(isDeprecated)
val (abstractInherited, concreteInherited) = inherited.partition(isAbstract)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note:
If we just put inherited abstract members into "Abstract members" section, it loses the information that these methods are originated from inheritance.

@Florian3k Florian3k merged commit 5850d2d into scala:main Feb 2, 2024
19 checks passed
@Kordyjan Kordyjan added this to the 3.4.1 milestone Feb 14, 2024
WojciechMazur added a commit that referenced this pull request Jul 1, 2024
…ection" to LTS (#20881)

Backports #19552 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scaladoc doesn't show Builder#addOne as abstract
3 participants