Skip to content

Scaladoc: fixes and improvements to context bounds and extension methods #22156

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Florian3k
Copy link
Contributor

@Florian3k Florian3k commented Dec 6, 2024

Closes #21662

More specifically:

Additionally fixed and improved simplifying of type lambdas (TypesSupport.scala)

Removed MemberInfo and unwrapMemberInfo, which were quite complicated, doing several things at the same time and caused parseMember to have two sources of truth.

@Florian3k Florian3k force-pushed the scaladoc-context-bounds-extension-methods branch 2 times, most recently from 67ee8ec to 7540be2 Compare December 6, 2024 17:14
@rjolly
Copy link
Contributor

rjolly commented Dec 31, 2024

The change works for me.

@rjolly
Copy link
Contributor

rjolly commented Feb 10, 2025

@Florian3k , if you do not have more changes, maybe we could remove the draft status, what do you think? @mbovel please could you consider a review? Thanks!

@Florian3k
Copy link
Contributor Author

There's one more thing to fix. Changes in this PR uncovered some bugs in rendering of this.type in some places. I was busy in January, but I'll be finishing this soon.

@jchyb jchyb force-pushed the scaladoc-context-bounds-extension-methods branch from 7540be2 to 86c6894 Compare May 14, 2025 14:30
@jchyb
Copy link
Contributor

jchyb commented May 15, 2025

Note for @Florian3k, about my adjustments with this-types:
Truthfully I didn’t change much since the WIP PR, since it mostly looked good to go. The added this types in most cases can be helpful in avoiding ambiguities - notably in the tastcase case class IAmACaseClassWithParam[T](x: Documentation.this.T, id: T) I added, without the rendered Documentation.this.T, we would not know which T was referenced. I adjusted test cases classSignatureTestSource.scala and exports1.scala with that in mind.
They aren’t really helpful when it comes to the supertypes in the extends clause - they will always be classlikes, and they will always have links in the signature, so ambiguities aren’t an issue. For those I ended up just adding skipThisTypeInPrefix parameter to TypesSupport. I unfortunately was not able to make it cleaner by adding it as a default parameter (when I did that I had some surpiring issues with path dependent types), so the asSignature methods are overridden to achieve the same effect.

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: fails to generate doc for ScAS
3 participants