[go: nahoru, domu]

Skip to content
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

Switch document generation to use the snippets package #87231

Merged
merged 2 commits into from
Aug 12, 2021

Conversation

gspencergoog
Copy link
Contributor
@gspencergoog gspencergoog commented Jul 28, 2021

Switch document generation to use the snippets package instead of the snippets code in the Flutter repo. In the process, some bugs in sample code analysis have been fixed, and I've fixed some more errors in the samples.

This will allow the snippets package to be developed separately from the Flutter repo, and reduce the code in the Flutter repo.

The snippets code is deleted in this PR.

I also converted some comments in the snippet templates to be regular comments instead of doc comments, because having a doc comment block before the imports causes the Dart import sorter to lose the comment. They should have been regular comments in the first place.

The snippets package resides in the assets-for-api-docs repo.

The sample analysis has also been converted to be run in parallel, and I've bumped the Dartdoc version to 1.0.2.

@flutter-dashboard flutter-dashboard bot added f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. team Infra upgrades, team productivity, code health, technical debt. See also team: labels. labels Jul 28, 2021
@google-cla google-cla bot added the cla: yes label Jul 28, 2021
Copy link
Member
@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

Delete all the code!

LGTM

dev/bots/docs.sh Outdated Show resolved Hide resolved
dev/bots/docs.sh Outdated Show resolved Hide resolved
dev/snippets/bin/snippets Outdated Show resolved Hide resolved
Copy link
Member
@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

Still LGTM

dev/snippets/config/templates/freeform.tmpl Show resolved Hide resolved
@goderbauer
Copy link
Member

Looks like luci is unhappy, though.

@gspencergoog
Copy link
Contributor Author

Yeah, LUCI, what the heck? :-) Why are you killing my process?

It's possible that it spawned too many processes too fast: I've seen that when the snippets tool takes too long, since dartdoc doesn't seem to throttle the invocation of the tools.

@gspencergoog gspencergoog force-pushed the use_snippets_pkg branch 2 times, most recently from a86c5b9 to 01a24ee Compare August 4, 2021 01:43
@CaseyHillers
Copy link
Contributor

Yeah, LUCI, what the heck? :-) Why are you killing my process?

I was summoned because I thought I broke something :-)

Is the expectation that we will need to increase the memory on the LUCI bots as well? IIRC we're running 8 GB for the framework VMs

@gspencergoog
Copy link
Contributor Author

Is the expectation that we will need to increase the memory on the LUCI bots as well? IIRC we're running 8 GB for the framework VMs

Yeah, we might have to. I have no idea how to change that, however.

@gspencergoog
Copy link
Contributor Author

Actually, I'm wondering if dartdoc has a bug in its tool invocation throttling. I know that if I make a snippets tool that takes a while to run, I can get my machine up to a load average of 1000 or so. This current setup doesn't do that, but maybe on a slower server it does. I'll investigate that today.

@CaseyHillers
Copy link
Contributor

Yeah, we might have to. I have no idea how to change that, however.

meme: that's the neat part, you don't

If we can't get it down, sign up for go/flutter-infra-office-hours and we can discuss it more (it's more of a logistics issue)

@gspencergoog
Copy link
Contributor Author

Indeed, Dartdoc seems to not throttle non-Dart tool invocations.

Filed dart-lang/dartdoc#2728

@gspencergoog
Copy link
Contributor Author

This PR is just waiting for the next Dartdoc release (and bump in the Flutter repo) to pick up the concurrency fix that is causing the OOM failure in the tests here.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 11, 2021
@gspencergoog gspencergoog merged commit 10e4b04 into flutter:master Aug 12, 2021
@gspencergoog gspencergoog deleted the use_snippets_pkg branch August 12, 2021 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. team Infra upgrades, team productivity, code health, technical debt. See also team: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants