Skip to content

"Failed to run dartdoc" without any output #3885

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
ganigeorgiev opened this issue Jul 26, 2020 · 3 comments · Fixed by #3890
Closed

"Failed to run dartdoc" without any output #3885

ganigeorgiev opened this issue Jul 26, 2020 · 3 comments · Fixed by #3890
Milestone

Comments

@ganigeorgiev
Copy link

There seems to be some unknown error with dartdoc on package publishing.

I've recently submitted the following package - dygraph.dart and under the "Provide documentation" section is shown that dartdoc has failed to run, but there isn't any output.

I'm able to successfully generate locally the documentation with dartdoc v0.32.1, so I assume that the issue is pub.dev related:

Generating docs for library dygraph from package:dygraph/dygraph.dart...
Validating docs...
no issues found
Documented 1 public library in 6.8 seconds
Success! Docs generated into /path_to_lib/dygraph/doc/api
@ganigeorgiev ganigeorgiev changed the title Failed to run dartdoc without any output on package publishing "Failed to run dartdoc" without any output on package publishing Jul 26, 2020
@ganigeorgiev ganigeorgiev changed the title "Failed to run dartdoc" without any output on package publishing "Failed to run dartdoc" without any output Jul 26, 2020
@isoos
Copy link
Collaborator

isoos commented Jul 26, 2020

@ganigeorgiev: Thanks for reporting this! It looks like this is a bug in our dartdoc generator/ HTML customizer code:

NoSuchMethodError: The getter 'attributes' was called on null.
Receiver: null
Tried calling: attributes
#0      DartdocCustomizer._addPubPackageLink (package:pub_dev/dartdoc/customization.dart:168:17)
#1      DartdocCustomizer.customizeHtml (package:pub_dev/dartdoc/customization.dart:61:7)
#2      DartdocCustomizer.customizeFile (package:pub_dev/dartdoc/customization.dart:35:31)
<asynchronous suspension>
#3      DartdocCustomizer.customizeDir (package:pub_dev/dartdoc/customization.dart:26:25)
<asynchronous suspension>
#4      DartdocJobProcessor.process (package:pub_dev/dartdoc/dartdoc_runner.dart:209:14)
<asynchronous suspension>
#5      JobProcessor.run (package:pub_dev/job/job.dart:69:28)
<asynchronous suspension>
#6      JobMaintenance.run (package:pub_dev/job/job.dart:119:18)

At the same time I see a recent completion of retrying the dygraph 0.1.1 documentation generation, so it may be that this will be cleared once the caches clear. I'll take a look at it regardless...

@isoos
Copy link
Collaborator

isoos commented Jul 27, 2020

I think I've identified the root cause: dygraph uses repository: in pubspec.yaml and no homepage:. dartdoc generated a slightly different HTML markup (with homepage it links to it, with repository it does not link to it), and we were not prepared for that. Filed a bug for it in dart-lang/dartdoc#2275

We'll also need to handle that gracefully on our side.

@ganigeorgiev
Copy link
Author

@isoos Thanks for the follow up. I've just published a new version (v0.1.1+1) with homepage and could confirm that the documentation was successfully generated.

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

Successfully merging a pull request may close this issue.

2 participants