Skip to content

Data extraction from dartdoc internals. #1353

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 15, 2018

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented Jun 6, 2018

I think it is the best if we keep the package:dartdoc dependency and our specific overrides in separate package (calling it pub_dartdoc), one which we run as an external process (same as if we were running dartdoc). This would allow the dependencies to have separate upgrade paths and schedules.

Added a test that is running on this small package and tests the output of the doc generation and our data extraction too.

The data contains:

  • the kind and the fully qualified name of the public API member,
  • the source file (for coverage scoring),
  • the href, which is the URL of the output file (for search),
  • the parent FQN (to group for search), and
  • the documentation text (if exists).

Related issues: dart-lang/pana#269, dart-lang/dartdoc#1667, #1179

The package is not yet used as part of the pub site, it will be integrated in a subsequent PR.

@isoos isoos requested review from sortie and jcollins-g June 6, 2018 12:58
@isoos
Copy link
Collaborator Author

isoos commented Jun 6, 2018

@jcollins-g: please take a quick look on our use of the dartdoc API.

@isoos isoos force-pushed the dartdoc_directlib branch from feee81a to 89388d5 Compare June 12, 2018 12:36
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

final outputFile = new File(p.join(outputDirectoryPath, fileName));
await outputFile.writeAsString(convert.json.encode(extract.toJson()));
_onFileCreated.add(outputFile);
_writtenFiles.add(fileName);
Copy link

Choose a reason for hiding this comment

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

Did you mean outputFile?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wasn't sure about that either, the API documentation didn't specify it exactly, but package:dartdoc uses the same relative path pattern, and I'd go with that.

@isoos isoos merged commit d593dda into dart-lang:master Jun 15, 2018
@isoos isoos deleted the dartdoc_directlib branch June 15, 2018 09:03
@jcollins-g
Copy link

Sorry, missed this while I was out last week. Use of API looks good to me at a glance.

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.

None yet

4 participants