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

Pipe the '--stats' flag through for the 'doc sdk' task #3791

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tool/task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Future<void> runDoc(ArgResults commandResults) async {
'flutter' => docFlutter(withStats: stats),
'help' => _docHelp(),
'package' => _docPackage(commandResults, withStats: stats),
'sdk' => docSdk(),
'sdk' => docSdk(withStats: stats),
'testing-package' => docTestingPackage(),
_ => throw UnimplementedError('Unknown doc target: "$target"'),
};
Expand Down Expand Up @@ -462,9 +462,10 @@ Future<String> docPackage({
return path.join(pubPackageDir.absolute.path, 'doc', 'api');
}

Future<void> docSdk() async => _docSdk(
Future<void> docSdk({bool withStats = false}) async => _docSdk(
sdkDocsPath: _sdkDocsDir.path,
dartdocPath: Directory.current.path,
withStats: withStats,
);

/// Creates a throwaway pub cache and returns the environment variables
Expand Down Expand Up @@ -547,6 +548,7 @@ Future<void> compareSdkWarnings() async {
Future<Iterable<Map<String, Object?>>> _docSdk({
required String sdkDocsPath,
required String dartdocPath,
bool withStats = false,
}) async {
var launcher = SubprocessLauncher('build-sdk-docs');
await launcher
Expand All @@ -570,6 +572,7 @@ Future<Iterable<Map<String, Object?>>> _docSdk({
'lib/resources/blank.txt',
],
workingDirectory: dartdocPath,
withStats: withStats,
);
}

Expand Down