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
runtime mirrors: access to doc-comments #15704
Comments
This comment was originally written by @seaneagan This is for dart:mirrors, so Area-Library ? |
This comment was originally written by @seaneagan Apparently including |
Removed Type-Defect, Area-Pkg labels. |
This comment was originally written by @seaneagan Another use case for this: I think the reflectable package should be able to solve this nicely, so filed an issue there: |
The dart2js_mirrors.dart link in #3 does not work from here (possibly not at all) any more, and the version of that file that I can find may differ from what you have seen. However, I tried out this: import 'dart:mirrors'; /// DartDoc comment main() { which prints the empty list (so the doc comment is not included). I guess this is because mirrors.compiler.commentMap[getBeginToken()] is empty, but in any case it looks like a bug. So I'll assume that it will be supported. Based on that, it makes sense to make Reflectable behave in the same way (such that doc comments are included in the result returned by |
This issue was originally filed by @seaneagan
In unscripted (http://pub.dartlang.org/packages/unscripted) it would be ideal for users to define the help text as doc-comments:
/// ...
instead of metadata annotations:
@Command(help: '...')
dart:mirrors already has:
https://api.dartlang.org/docs/channels/be/latest/dart_mirrors/Comment.html
which says:
Class used for encoding comments as metadata annotations.
but they are not currently exposed anywhere. For doc-comments the logical place would be in
DeclarationMirror
probably as items inmetadata
. Non-doc-comments are less useful, and less obvious how to expose, so they could be left for source mirrors and/or the analyzer package.Original mailing list discussion:
https://groups.google.com/a/dartlang.org/forum/#!searchin/misc/doc$20comments$20metadata/misc/pDyDWw0AXDc/R0hbdkwUunoJ
The text was updated successfully, but these errors were encountered: