Skip to content

Missing Comment in childEntries for some AnnotatedNodes #60423

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

Closed
FMorschel opened this issue Mar 28, 2025 · 1 comment
Closed

Missing Comment in childEntries for some AnnotatedNodes #60423

FMorschel opened this issue Mar 28, 2025 · 1 comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.

Comments

@FMorschel
Copy link
Contributor

Some time ago, I was working on #59724 and noticed something weird about extensions and typedefs not triggering comments suggestions. Today I found out what was actually wrong.

Although https://dart-review.googlesource.com/c/sdk/+/411380 makes some suggestions show up, it doesn't work well with PrefixedIdentifiers. The problem is that even though both are AnnotatedNodes, they never add the corresponding Comment on the childEntries.

See:

Variable:

Typedef:

This makes some completions work weirdly, see on classes:

Image

On typedefs:

Image

This is a problem because at DartCompletionManager.computeCandidateSuggestions we call CompilationUnitImpl.select, which uses AstNodeExtension.nodeCovering internally for identifying the node.

We should probably think of a smart test to guarantee that any new AnnotatedNode also contains Comment on the childEntries.

CC @bwilkerson

@FMorschel FMorschel added the legacy-area-analyzer Use area-devexp instead. label Mar 28, 2025
@bwilkerson bwilkerson added area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. and removed legacy-area-analyzer Use area-devexp instead. labels Mar 28, 2025
@FMorschel
Copy link
Contributor Author

Here is the CL for this https://dart-review.googlesource.com/c/sdk/+/419422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.
Projects
None yet
Development

No branches or pull requests

2 participants