Skip to content

Run pkg/pub_dartdoc instead of global dartdoc #1384

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

Merged
merged 1 commit into from
Jun 20, 2018

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented Jun 18, 2018

#1179

I'll deploy this to staging with the initialization PR to test it.

@isoos isoos requested a review from sortie June 18, 2018 14:09
@isoos
Copy link
Collaborator Author

isoos commented Jun 18, 2018

Staging looks good, pub-data.json is generated as expected:
https://dartdoc-dot-dartlang-pub-dev.appspot.com/documentation/pana/latest/pub-data.json

@isoos
Copy link
Collaborator Author

isoos commented Jun 19, 2018

This is not flawless in staging, e.g. sometimes we get this warning from dartdoc and it breaks the further processing:
stderr: warning: dartdoc detected an unknown file in the doc tree: pub-data.json

@isoos
Copy link
Collaborator Author

isoos commented Jun 20, 2018

Looks like that warning does not affect the results, only it gets more visible when there are no .dart files in the package, but the log warning is about not having files there, the warning is unrelated.
As there is no quick way to fix the warning, and otherwise it works, I'm merging this.

@isoos
Copy link
Collaborator Author

isoos commented Jun 20, 2018

Oh, merging... after it gets reviewed :)

Copy link

@sortie sortie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Whoops forgot to submit my review.

final hasIndexJson =
await new File(p.join(outputDir, 'index.json')).exists();
return new DartdocResult(
pr, pr.exitCode == 15, hasIndexHtml, hasIndexJson);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about other error codes besides 0 and 15?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

15 is SIGTERM, which we get when the timeout kills the process. In that case we retry it without link validation, which is a time-consuming thing to do on a large archive. On any non-zero we emit the the log.warning about it.

However we don't really care about the exit code besides these two, as long as the run produced index.html and index.json (and we may add pub-data.json to that list too).

@isoos isoos merged commit e6928bf into dart-lang:master Jun 20, 2018
@isoos isoos deleted the dartdoc_run_pkg branch June 20, 2018 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants