Skip to content
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

[extension types] Extension type does not get a highlight in DartDoc #53592

Closed
Tracked by #49732
navaronbracke opened this issue Sep 22, 2023 · 5 comments
Closed
Tracked by #49732
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on

Comments

@navaronbracke
Copy link

navaronbracke commented Sep 22, 2023

Any symbol references for an extension type symbol do not get the right highlight color in DartDoc:

Tooltips in VSCode do work though, so it's just the highlight color.

Example:

import 'dart:js_interop';

@JS()
@anonymous
@staticInterop
extension type BasicParameters._(JSObject _) {
  /// Create a [BasicParameters] instance using the given [callback].
  external factory BasicParameters({JSFunction callback});
}

Here the [BasicParameters] reference is not in light green (as it is for classes).

- Dart 3.2.0-189.0.dev (dev) (Thu Sep 21 21:03:12 2023 -0700) on "macos_x64"
- on macos / Version 13.5.2 (Build 22G91)
- locale is en-BE

#### Process info

| Memory |  CPU | Elapsed time | Command line                                                                    |
| -----: | ---: | -----------: | ------------------------------------------------------------------------------- |
|  59 MB | 0.0% |     02:10:41 | dart devtools --machine --try-ports 10 --allow-embedding                        |
| 688 MB | 0.0% |     02:10:41 | dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.72.2 |

Screenshot 2023-09-22 at 12 57 15

@bwilkerson bwilkerson added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Sep 22, 2023
@pq pq added the P2 A bug or feature request we're likely to work on label Sep 25, 2023
@srawlins
Copy link
Member

Forgive the seemingly nitpicky question, but the issue is with how doc comments are highlighted in the IDE, yes? This is different from Dartdoc, which is a tool that uses doc comments to generate HTML documentation.

@bwilkerson
Copy link
Member

Interesting. Navigation also works, so we appear to be resolving the reference correctly.

My guess, without looking at the code, is that there's a test somewhere that checks what kind of element (declaration) the identifier resolved to and it doesn't correctly handle the element kind for extension types.

@navaronbracke
Copy link
Author

Forgive the seemingly nitpicky question, but the issue is with how doc comments are highlighted in the IDE, yes? This is different from Dartdoc, which is a tool that uses doc comments to generate HTML documentation.

Yes, the issue is about doc comments. Forgive me if I had the notion of "Dartdoc" wrong (which I assumed is a doc comment with /// for Dart code)

@srawlins
Copy link
Member

No worries; I have to make sure that dartdoc, the tool, is doing the right thing too, so just making sure 😁

@bwilkerson bwilkerson self-assigned this Nov 15, 2023
@bwilkerson
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

4 participants