Skip to content

"Failed to run dartdoc" missing fix hints #5138

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
creativecreatorormaybenot opened this issue Sep 25, 2021 · 3 comments
Closed

"Failed to run dartdoc" missing fix hints #5138

creativecreatorormaybenot opened this issue Sep 25, 2021 · 3 comments

Comments

@creativecreatorormaybenot

My package funvas on pub.dev is failing to run dartdoc:

Screen Shot 2021-09-25 at 14 58 08

The full error message is:

Click to expand full logs
exitCode: 255
stdout: [2021-09-23T02:34:05.867516] Starting...
Documenting funvas...
Initialized dartdoc with 576 libraries in 95.8 seconds
Generating docs for library funvas from package:funvas/funvas.dart...

stderr: Unhandled exception:
RangeError (end): Invalid value: Not in inclusive range 7..8: 1
#0      RangeError.checkValidRange (dart:core/errors.dart:338:9)
#1      _StringBase.substring (dart:core-patch/string_patch.dart:393:27)
#2      CommentReferenceParser._tryParseOperator (package:dartdoc/src/comment_references/parser.dart:208:20)
#3      CommentReferenceParser._parseIdentifier (package:dartdoc/src/comment_references/parser.dart:220:25)
#4      CommentReferenceParser._parseRawCommentReference (package:dartdoc/src/comment_references/parser.dart:114:30)
#5      CommentReferenceParser.parse (package:dartdoc/src/comment_references/parser.dart:85:20)
#6      _ModelCommentReferenceImpl.parsed (package:dartdoc/src/comment_references/model_comment_reference.dart:121:51)
#7      _ModelCommentReferenceImpl._initAllowCache (package:dartdoc/src/comment_references/model_comment_reference.dart:40:27)
#8      _ModelCommentReferenceImpl.allowDefaultConstructor (package:dartdoc/src/comment_references/model_comment_reference.dart:61:7)
#9      _getMatchingLinkElementCommentReferable (package:dartdoc/src/markdown_processor.dart:243:24)
#10     getMatchingLinkElement (package:dartdoc/src/markdown_processor.dart:964:16)
#11     _makeLinkNode (package:dartdoc/src/markdown_processor.dart:913:16)
#12     new MarkdownDocument.withElementLinkResolver.linkResolver (package:dartdoc/src/markdown_processor.dart:1062:14)
#13     LinkSyntax._resolveReferenceLink (package:markdown/src/inline_parser.dart:1057:34)
#14     LinkSyntax._tryCreateReferenceLink (package:markdown/src/inline_parser.dart:1085:12)
#15     LinkSyntax.close (package:markdown/src/inline_parser.dart:1028:12)
#16     InlineParser._linkOrImage (package:markdown/src/inline_parser.dart:152:29)
#17     InlineParser.parse (package:markdown/src/inline_parser.dart:108:9)
#18     MarkdownDocument._parseInlineContent (package:dartdoc/src/markdown_processor.dart:1111:67)
#19     MarkdownDocument._parseInlineContent (package:dartdoc/src/markdown_processor.dart:1116:9)
#20     MarkdownDocument.parseMarkdownText (package:dartdoc/src/markdown_processor.dart:1101:5)
#21     Documentation._parseDocumentation (package:dartdoc/src/model/documentation.dart:73:21)
#22     Documentation._renderDocumentation (package:dartdoc/src/model/documentation.dart:48:23)
#23     Documentation.asOneLiner (package:dartdoc/src/model/documentation.dart:40:7)
#24     ModelElement.oneLineDoc (package:dartdoc/src/model/model_element.dart:929:43)
#25     renderClass (package:dartdoc/src/generator/templates.aot_renderers_for_html.dart:1630:34)
#26     HtmlAotTemplates.renderClass (package:dartdoc/src/generator/templates.dart:127:7)
#27     DartdocGeneratorBackend.generateClass (package:dartdoc/src/generator/dartdoc_generator_backend.dart:157:29)
#28     GeneratorFrontEnd._generateDocs (package:dartdoc/src/generator/generator_frontend.dart:60:29)
#29     GeneratorFrontEnd.generate (package:dartdoc/src/generator/generator_frontend.dart:21:5)
#30     Dartdoc.generateDocsBase (package:dartdoc/dartdoc.dart:213:21)
<asynchronous suspension>
#31     Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:249:28)
<asynchronous suspension>
#32     main (file:///project/pkg/pub_dartdoc/bin/pub_dartdoc.dart:33:19)
<asynchronous suspension>

Now, I am wondering: how do I fix this? I am missing any hints at what part of the docs are causing this issue. I frankly have no idea.

I searched for similar issues, however, those are only regarding empty outputs (see #4675 and #3885).
And the RangeError (end): Invalid value: Not in inclusive range 7..8: 1 is so broad that I do not even know where to start.

@isoos
Copy link
Collaborator

isoos commented Sep 25, 2021

@creativecreatorormaybenot: thanks for reporting this!

This looks like a dartdoc bug, but I'm not sure what comment reference would make it a hard time to fail.
Could you please check if this is reproducible for you locally by running dartdoc?

@isoos
Copy link
Collaborator

isoos commented Sep 27, 2021

Reported it at dart-lang/dartdoc#2808

@sigurdm
Copy link
Contributor

sigurdm commented Oct 7, 2021

The fix will be included in next deployment.

@sigurdm sigurdm closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants