-
Notifications
You must be signed in to change notification settings - Fork 226
Remove rules about DartDoc comments in the language specification #4511
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
Conversation
I wonder if it would be useful to specify which element a given documentation comment associates with. I get the language team prefers to not decide everything here. But we need something for the teams to work with. |
We could say that any given DartDoc comment is associated with a syntactic element of kind This might very well associate any given DartDoc comment with several distinct syntactic elements (because they all start with the same token), but there is no ambiguity unless the DartDoc comment is meaningful for more than one of those syntactic elements (all the others will just "ignore" that DartDoc comment). However, all these decisions could also be made by the relevant tool team(s), which was the motivation for the change as proposed in this PR. Is it important to standardize explicitly on these things? |
If we expect users to use a feature, and multiple tools need to work with it, it needs to be specified/standardized. It doesn't have to be by the language spec per se, but I wonder where is a better place to spec this out... |
The language team decided that we should have the syntax of the DartDoc comment in the language specification, but nothing about where it can occur and how it is determined which syntactic construct it is targeting. Now I hear requests for keeping more stuff in the language specification, and less. For now, I'll just keep the text as decided at that meeting. ;-) |
I agree, all of our tools need to support doc comments in the same way. The two tools that I know of that interpret doc comments are the analysis server and I have no objection to having a written specification of the behavior somewhere, and we minimally need to have user-facing documentation so that users know how to use the feature effectively. I would recommend that we move this conversation off to a separate thread and make sure that the conversation involves all of the right participants (minimally the pub team, since they now own |
@bwilkerson, I created #4513 in order to discuss the desired level of specification. This PR will lay dormant until #4513 yields a decision. |
The newest commit removed everything in the language specification about documentation comments, which seems to be the approach that has general support. |
Update: This PR removes everything in the language specification that is concerned with documentation comments. The treatment of this topic area is now fully determined by each tool team.
Previous description:
The language specification specifies the syntax that makes a comment a DartDoc comment, which is unchanged. This PR adds a paragraph of 'rationale' text explaining that everything else is tool specific behavior, and it removes the rules about scoping in DartDoc comments.
There were no rules about the locations where a DartDoc comment can occur, which means that it is still "any location where a comment can occur". Moreover, each tool can freely choose that a DartDoc comment is processed in a specific way when it occurs in a specific kind of location (including that it is ignored, or a diagnostic message is emitted).