Skip to content

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

Closed
Listed in
@navaronbracke

Description

@navaronbracke

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

Activity

added
P2A bug or feature request we're likely to work on
on Sep 25, 2023
srawlins

srawlins commented on Nov 15, 2023

@srawlins
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

bwilkerson commented on Nov 15, 2023

@bwilkerson
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

navaronbracke commented on Nov 15, 2023

@navaronbracke
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

srawlins commented on Nov 15, 2023

@srawlins
Member

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

self-assigned this
on Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @pq@srawlins@bwilkerson@navaronbracke

      Issue actions

        [extension types] Extension type does not get a highlight in DartDoc · Issue #53592 · dart-lang/sdk