mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
Enable track widget creation on by default (#43471)
This commit is contained in:
parent
02abd00e93
commit
4bd5eb5915
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue