dart-lang / dartdoc

API documentation tool for Dart.
https://pub.dev/packages/dartdoc
BSD 3-Clause "New" or "Revised" License
473 stars 119 forks source link

extension type's constructor parameter gets a symbol but no documentation can be attached to it #3830

Open isoos opened 2 months ago

isoos commented 2 months ago

The latest 8.0.13 (and earlier versions) have this result, originally reported at https://github.com/dart-lang/pana/issues/1393

extension type const Celsius(

    /// This text is not in the dartdoc output.
    num degrees) implements num {
}

Celsius.degrees gets into the output both as file (<library>/Celsius/degrees.html) and as part of the searchable API symbols JSON. Either we shouldn't get a separate symbol, or it should be able to provide some kind of documentation (like in the above case).

Alternatively: is there any way we could detect these symbols just by parsing the JSON file?

srawlins commented 2 months ago

Dartdoc cannot do anything here because neither the RepresentationDeclaration nor any of it's child nodes can have a documentation comment. I've moved this issue to the SDK repo.

srawlins commented 2 months ago

Sorry, I didn't read the description closely enough 😊 . Sounds like a dartdoc issue.