ensure we can disable --track-widget-creation in debug mode (#43016)

This commit is contained in:
Jonah Williams
2019-10-18 12:40:50 -07:00
committed by GitHub
parent 5db53aee5e
commit e67f9a3f6c
4 changed files with 66 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ class BundleBuilder {
outputDir: assetDirPath,
depfilePath: depfilePath,
precompiled: precompiledSnapshot,
trackWidgetCreation: trackWidgetCreation,
);
// Work around for flutter_tester placing kernel artifacts in odd places.
if (applicationKernelFilePath != null) {
@@ -103,6 +104,7 @@ Future<void> buildWithAssemble({
@required String outputDir,
@required String depfilePath,
@required bool precompiled,
bool trackWidgetCreation,
}) async {
// If the precompiled flag was not passed, force us into debug mode.
buildMode = precompiled ? buildMode : BuildMode.debug;
@@ -114,6 +116,7 @@ Future<void> buildWithAssemble({
kTargetFile: mainPath,
kBuildMode: getNameForBuildMode(buildMode),
kTargetPlatform: getNameForTargetPlatform(targetPlatform),
kTrackWidgetCreation: trackWidgetCreation?.toString(),
},
);
final Target target = buildMode == BuildMode.debug