-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Reland: "Reorganize and clarify API doc generator" (#132353) #132710
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
Conversation
573b12b to
d817b84
Compare
d817b84 to
5a45d04
Compare
d9c7c22 to
f985249
Compare
dev/tools/create_api_docs.dart
Outdated
| import 'dartdoc_checker.dart'; | ||
| import 'examples_smoke_test.dart'; | ||
|
|
||
| FileSystem filesystem = const LocalFileSystem(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
| FileSystem filesystem = const LocalFileSystem(); | |
| const FileSystem filesystem = LocalFileSystem(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that was on purpose: I wanted tests to be able to set that global to a memory filesystem (even though I don't actually use that capability yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in talking to Chris, I think he's right: if I write more tests for this, I'd be testing the main classes, not the main function itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen my share of test flakes from this pattern :)
dev/tools/create_api_docs.dart
Outdated
| if (!offlineDir.existsSync()) { | ||
| offlineDir.createSync(recursive: true); | ||
| } | ||
| tarDirectory(packageRoot, offlineDir.childFile('flutter.docset.tar.gz')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we call this on Windows? I wouldn't expect tar to be present on Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only expected to work on Linux and macOS. It is only called on Linux in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be another advantage of rewriting the bash script in Dart: it might run on Windows. Of course, you'd still have to have tar, since that's what the expected output for the offline docs is, but you could use the archive package to do it. It generates ZIP files that are about 40% larger though, so you wouldn't want to use package:archive for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i forgot we only build docs on linux, carry on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to deprecate package:archive, btw #115660
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
) It looks like the logic added here: https://github.com/flutter/flutter/pull/131951/files#diff-297ee4cfe6d9bffc2fa1376918a50b8e4165ada4569575880c40811b6f749265R18 got dropped in the refactor here: #132710
Description
This re-lands #132353 with some additional options for keeping around the staging directory, so that the recipe for publishing docs can give those options and have the staging directory left around for deploying to the website.
Reverted in #132613
Related Issues