[flutter_tools] use --no-print-incremental-dependencies for non-resident and test compiles (#68678)
This commit is contained in:
@@ -237,6 +237,7 @@ class KernelCompiler {
|
||||
'--sdk-root',
|
||||
sdkRoot,
|
||||
'--target=$targetModel',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=${buildMode == BuildMode.debug}',
|
||||
for (final Object dartDefine in dartDefines)
|
||||
'-D$dartDefine',
|
||||
@@ -397,9 +398,11 @@ class _RejectRequest extends _CompilationRequest {
|
||||
abstract class ResidentCompiler {
|
||||
factory ResidentCompiler(String sdkRoot, {
|
||||
@required BuildMode buildMode,
|
||||
Logger logger, // TODO(jonahwilliams): migrate to @required after google3
|
||||
ProcessManager processManager, // TODO(jonahwilliams): migrate to @required after google3
|
||||
Artifacts artifacts, // TODO(jonahwilliams): migrate to @required after google3
|
||||
@required Logger logger,
|
||||
@required ProcessManager processManager,
|
||||
@required Artifacts artifacts,
|
||||
@required Platform platform,
|
||||
bool testCompilation,
|
||||
bool trackWidgetCreation,
|
||||
String packagesPath,
|
||||
List<String> fileSystemRoots,
|
||||
@@ -411,7 +414,6 @@ abstract class ResidentCompiler {
|
||||
String platformDill,
|
||||
List<String> dartDefines,
|
||||
String librariesSpec,
|
||||
@required Platform platform,
|
||||
}) = DefaultResidentCompiler;
|
||||
|
||||
// TODO(jonahwilliams): find a better way to configure additional file system
|
||||
@@ -496,10 +498,11 @@ class DefaultResidentCompiler implements ResidentCompiler {
|
||||
DefaultResidentCompiler(
|
||||
String sdkRoot, {
|
||||
@required this.buildMode,
|
||||
@required Logger logger,
|
||||
@required ProcessManager processManager,
|
||||
@required Artifacts artifacts,
|
||||
@required Platform platform,
|
||||
Logger logger, // TODO(jonahwilliams): migrate to @required after google3
|
||||
ProcessManager processManager, // TODO(jonahwilliams): migrate to @required after google3
|
||||
Artifacts artifacts, // TODO(jonahwilliams): migrate to @required after google3
|
||||
this.testCompilation = false,
|
||||
this.trackWidgetCreation = true,
|
||||
this.packagesPath,
|
||||
this.fileSystemRoots,
|
||||
@@ -526,6 +529,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
|
||||
final Artifacts _artifacts;
|
||||
final Platform _platform;
|
||||
|
||||
final bool testCompilation;
|
||||
final BuildMode buildMode;
|
||||
final bool trackWidgetCreation;
|
||||
final String packagesPath;
|
||||
@@ -642,6 +646,8 @@ class DefaultResidentCompiler implements ResidentCompiler {
|
||||
'--sdk-root',
|
||||
sdkRoot,
|
||||
'--incremental',
|
||||
if (testCompilation)
|
||||
'--no-print-incremental-dependencies',
|
||||
'--target=$targetModel',
|
||||
// TODO(jonahwilliams): remove once this becomes the default behavior
|
||||
// in the frontend_server.
|
||||
|
||||
@@ -109,6 +109,7 @@ class TestCompiler {
|
||||
packagesPath: globalPackagesPath,
|
||||
extraFrontEndOptions: extraFrontEndOptions,
|
||||
platform: globals.platform,
|
||||
testCompilation: true,
|
||||
);
|
||||
return residentCompiler;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ void main() {
|
||||
mode: BuildMode.profile,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=false',
|
||||
...buildModeOptions(BuildMode.profile),
|
||||
'--aot',
|
||||
@@ -124,6 +125,7 @@ void main() {
|
||||
mode: BuildMode.profile,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=false',
|
||||
...buildModeOptions(BuildMode.profile),
|
||||
'--aot',
|
||||
@@ -160,6 +162,7 @@ void main() {
|
||||
mode: BuildMode.profile,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=false',
|
||||
...buildModeOptions(BuildMode.profile),
|
||||
'--aot',
|
||||
@@ -197,6 +200,7 @@ void main() {
|
||||
mode: BuildMode.profile,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=false',
|
||||
...buildModeOptions(BuildMode.profile),
|
||||
'--aot',
|
||||
@@ -236,6 +240,7 @@ void main() {
|
||||
mode: BuildMode.debug,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=true',
|
||||
...buildModeOptions(BuildMode.debug),
|
||||
'--no-link-platform',
|
||||
@@ -273,6 +278,7 @@ void main() {
|
||||
mode: BuildMode.debug,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=true',
|
||||
...buildModeOptions(BuildMode.debug),
|
||||
'--packages',
|
||||
@@ -322,6 +328,7 @@ void main() {
|
||||
mode: BuildMode.debug,
|
||||
) + '/',
|
||||
'--target=flutter',
|
||||
'--no-print-incremental-dependencies',
|
||||
'-Ddart.developer.causal_async_stacks=true',
|
||||
...buildModeOptions(BuildMode.debug),
|
||||
'--track-widget-creation',
|
||||
|
||||
Reference in New Issue
Block a user