Unverified Commit 4bd5eb59 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Enable track widget creation on by default (#43471)

parent 02abd00e
......@@ -514,7 +514,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
String sdkRoot, {
@required this.buildMode,
this.causalAsyncStacks = true,
this.trackWidgetCreation = false,
this.trackWidgetCreation = true,
this.packagesPath,
this.fileSystemRoots,
this.fileSystemScheme,
......
......@@ -361,7 +361,7 @@ abstract class FlutterCommand extends Command<void> {
argParser.addFlag(
'track-widget-creation',
hide: !hasEffect && !verboseHelp,
defaultsTo: false, // this will soon be changed to true
defaultsTo: true,
help: 'Track widget creation locations. This enables features such as the widget inspector. '
'This parameter is only functional in debug mode (i.e. when compiling JIT, not AOT).',
);
......
......@@ -62,7 +62,8 @@ void main() {
testUsingContext('report which user created widget caused the error - no flag', () async {
Cache.flutterRoot = '../..';
return _testFile('print_user_created_ancestor_no_flag', automatedTestsDirectory, flutterTestDirectory);
return _testFile('print_user_created_ancestor_no_flag', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--no-track-widget-creation']);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Dart on Windows has trouble with unicode characters in output (#35425).
testUsingContext('report correct created widget caused the error', () async {
......
......@@ -209,7 +209,7 @@ flutter:
gradlew,
'-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false',
'-Ptrack-widget-creation=true',
'-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease',
......@@ -241,7 +241,7 @@ flutter:
gradlew,
'-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false',
'-Ptrack-widget-creation=true',
'-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease',
],
......@@ -265,7 +265,7 @@ flutter:
gradlew,
'-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false',
'-Ptrack-widget-creation=true',
'-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease',
......@@ -321,7 +321,7 @@ flutter:
gradlew,
'-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false',
'-Ptrack-widget-creation=true',
'-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease',
......@@ -374,7 +374,7 @@ flutter:
gradlew,
'-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false',
'-Ptrack-widget-creation=true',
'-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment