Skip to content

Commit 80f12af

Browse files
alexmarkovcommit-bot@chromium.org
authored andcommitted
[frontend_server] Add --no-print-incremental-dependencies option to suppress extra frontend_server output
Front-end server prints all dependencies after compilation, which could result in a lot of output when AOT compiling a large application. This change adds --no-print-incremental-dependencies option which suppresses extra output. This skips printing dependencies which takes time and avoids I/O which may be blocked. Issue: #43299 Change-Id: I7779d3b5f1b513c2370978a5384a71cff371f017 b/154155290 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167860 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent 07ce848 commit 80f12af

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/frontend_server/lib/frontend_server.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ ArgParser argParser = ArgParser(allowTrailingOptions: true)
180180
defaultsTo: 'amd')
181181
..addFlag('flutter-widget-cache',
182182
help: 'Enable the widget cache to track changes to Widget subtypes',
183-
defaultsTo: false);
183+
defaultsTo: false)
184+
..addFlag('print-incremental-dependencies',
185+
help: 'Print list of sources added and removed from compilation',
186+
defaultsTo: true);
184187

185188
String usage = '''
186189
Usage: server [options] [input.dart]
@@ -339,6 +342,7 @@ class FrontendCompiler implements CompilerInterface {
339342
bool incrementalSerialization;
340343
bool useDebuggerModuleNames;
341344
bool emitDebugMetadata;
345+
bool _printIncrementalDependencies;
342346

343347
CompilerOptions _compilerOptions;
344348
BytecodeOptions _bytecodeOptions;
@@ -406,6 +410,7 @@ class FrontendCompiler implements CompilerInterface {
406410
_kernelBinaryFilename = _kernelBinaryFilenameFull;
407411
_initializeFromDill =
408412
_options['initialize-from-dill'] ?? _kernelBinaryFilenameFull;
413+
_printIncrementalDependencies = _options['print-incremental-dependencies'];
409414
final String boundaryKey = Uuid().generateV4();
410415
_outputStream.writeln('result $boundaryKey');
411416
final Uri sdkRoot = _ensureFolderPath(options['sdk-root']);
@@ -609,6 +614,9 @@ class FrontendCompiler implements CompilerInterface {
609614
}
610615

611616
void _outputDependenciesDelta(Iterable<Uri> compiledSources) async {
617+
if (!_printIncrementalDependencies) {
618+
return;
619+
}
612620
Set<Uri> uris = Set<Uri>();
613621
for (Uri uri in compiledSources) {
614622
// Skip empty or corelib dependencies.

0 commit comments

Comments
 (0)