-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
scaladoc comment for multiple enum cases is silently ignored without any warning #16610
Comments
Noticed while fixing https://youtrack.jetbrains.com/issue/SCL-20892 |
Hello @unkarjedy, during my research on your problem, with @ckipp01, we noticed that the comment deletion as in your example was not done during the generation of Scaladoc but well before. As you can see in the screenshot below, the comment is not already present in the TASTY file of our code. So when our scaladoc is generated with "sbt doc" for example, it already has no idea of the existence of this comment, which makes the warning at scaladoc generation time impossible. One of the secondary solutions would be to send a warning when the comment is deleted at compile time, but this is no longer relevant to the generation of the scaladoc. |
Before this commit, the compiler ignored Scaladoc comment on multiple enum cases without warning. This is partly expected because the case to which the doc is attached is ambiguous, but we should at least warn users that the comment is ignored by compiler due to ambiguity and they should take an action if they want the doc to be displayed.
Before this commit, the compiler ignored Scaladoc comment on multiple enum cases without warning. This is partly expected because the case to which the doc is attached is ambiguous, but we should at least warn users that the comment is ignored by compiler due to ambiguity and they should take an action if they want the doc to be displayed.
close #16610 Before this commit, the compiler ignored Scaladoc comment on multiple enum cases without warning. This is partly expected because the case to which the doc is attached is ambiguous, but we should at least warn users that the comment is ignored by compiler due to ambiguity and they should take an action if they want the doc to be displayed.
close #16610 Before this commit, the compiler ignored Scaladoc comment on multiple enum cases without warning. This is partly expected because the case to which the doc is attached is ambiguous, but we should at least warn users that the comment is ignored by compiler due to ambiguity and they should take an action if they want the doc to be displayed. [Cherry-picked 11a6f0a][modified]
Compiler version
Minimized code
Run
sbt doc
Notice that no documentation will be generated for
MyCase2
andMyCase3
:This is kinda expected (to some degree), for example because scala doc could contain references to parameters and type parameters:
Expectation
At least some warning should be printed during
sbt doc
.Something like "Scaladoc at position ... was ignored because..."
Actual result
The comment is silently ignored without any warning
The text was updated successfully, but these errors were encountered: