Skip to content

introduce scala.annotation.documented #23770

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

hamzaremmal
Copy link
Member

@hamzaremmal hamzaremmal commented Aug 16, 2025

TODO:

  • Document the annotation and it's usage
  • Try to avoid using java.lang.annotation.Documented in scala.annotation.documented
  • Should we actually keep the effect of java.lang.annotation.Documented or drop it?
    • I believe we should keep the effect

@hamzaremmal hamzaremmal self-assigned this Aug 16, 2025
@hamzaremmal hamzaremmal added area:annotations area:documentation area:doctool area:library Standard library release-notes Should be mentioned in the release notes needs-minor-release This PR cannot be merged until the next minor release labels Aug 16, 2025
* environment.
*/
@experimental
@experimental @documented
Copy link
Member Author

Choose a reason for hiding this comment

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

One change compared to the previous behavior, this means all the @use annotations of CC will be in the doc even when we suppress cc in scaladoc.

@hamzaremmal
Copy link
Member Author

The failures in the CI are actually bugs in scaladoc. I'll fill the issue for it shortly.

Comment on lines -47 to -56
"scala.specialized",
"scala.throws",
"scala.transient",
"scala.volatile",
"scala.annotation.experimental",
"scala.annotation.constructorOnly",
"scala.annotation.static",
"scala.annotation.targetName",
"scala.annotation.threadUnsafe",
"scala.annotation.varargs",
Copy link
Member Author

Choose a reason for hiding this comment

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

This list was useless as all the symbols in the annotations are symbols to the constructors.
As an example, we should have had scala.annotation.experimental.<init> instead of scala.annotation.experimental.
Since the intention is to have these annotations as documented, I will update the tests that failed to include them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:annotations area:doctool area:documentation area:library Standard library needs-minor-release This PR cannot be merged until the next minor release release-notes Should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant