Enable track widget creation on by default (#43471)

This commit is contained in:
Jonah Williams 2019-10-25 15:04:06 -07:00 committed by GitHub
parent 02abd00e93
commit 4bd5eb5915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View file

@ -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,

View file

@ -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).',
);

View file

@ -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 {

View file

@ -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',