Reland: "Reorganize and clarify API doc generator" (#132353)#132710
Reland: "Reorganize and clarify API doc generator" (#132353)#132710auto-submit[bot] merged 8 commits intoflutter:masterfrom
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.
nit
| FileSystem filesystem = const LocalFileSystem(); | |
| const FileSystem filesystem = LocalFileSystem(); |
There was a problem hiding this comment.
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.
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.
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.
Do we call this on Windows? I wouldn't expect tar to be present on Windows
There was a problem hiding this comment.
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.
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.
oh, i forgot we only build docs on linux, carry on
There was a problem hiding this comment.
I'm trying to deprecate package:archive, btw #115660
) 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