mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +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, {
|
String sdkRoot, {
|
||||||
@required this.buildMode,
|
@required this.buildMode,
|
||||||
this.causalAsyncStacks = true,
|
this.causalAsyncStacks = true,
|
||||||
this.trackWidgetCreation = false,
|
this.trackWidgetCreation = true,
|
||||||
this.packagesPath,
|
this.packagesPath,
|
||||||
this.fileSystemRoots,
|
this.fileSystemRoots,
|
||||||
this.fileSystemScheme,
|
this.fileSystemScheme,
|
||||||
|
|
|
@ -361,7 +361,7 @@ abstract class FlutterCommand extends Command<void> {
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'track-widget-creation',
|
'track-widget-creation',
|
||||||
hide: !hasEffect && !verboseHelp,
|
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. '
|
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).',
|
'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 {
|
testUsingContext('report which user created widget caused the error - no flag', () async {
|
||||||
Cache.flutterRoot = '../..';
|
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).
|
}, 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 {
|
testUsingContext('report correct created widget caused the error', () async {
|
||||||
|
|
|
@ -209,7 +209,7 @@ flutter:
|
||||||
gradlew,
|
gradlew,
|
||||||
'-q',
|
'-q',
|
||||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||||
'-Ptrack-widget-creation=false',
|
'-Ptrack-widget-creation=true',
|
||||||
'-Pshrink=true',
|
'-Pshrink=true',
|
||||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||||
'assembleRelease',
|
'assembleRelease',
|
||||||
|
@ -241,7 +241,7 @@ flutter:
|
||||||
gradlew,
|
gradlew,
|
||||||
'-q',
|
'-q',
|
||||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
'-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',
|
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||||
'assembleRelease',
|
'assembleRelease',
|
||||||
],
|
],
|
||||||
|
@ -265,7 +265,7 @@ flutter:
|
||||||
gradlew,
|
gradlew,
|
||||||
'-q',
|
'-q',
|
||||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||||
'-Ptrack-widget-creation=false',
|
'-Ptrack-widget-creation=true',
|
||||||
'-Pshrink=true',
|
'-Pshrink=true',
|
||||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||||
'assembleRelease',
|
'assembleRelease',
|
||||||
|
@ -321,7 +321,7 @@ flutter:
|
||||||
gradlew,
|
gradlew,
|
||||||
'-q',
|
'-q',
|
||||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||||
'-Ptrack-widget-creation=false',
|
'-Ptrack-widget-creation=true',
|
||||||
'-Pshrink=true',
|
'-Pshrink=true',
|
||||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||||
'assembleRelease',
|
'assembleRelease',
|
||||||
|
@ -374,7 +374,7 @@ flutter:
|
||||||
gradlew,
|
gradlew,
|
||||||
'-q',
|
'-q',
|
||||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||||
'-Ptrack-widget-creation=false',
|
'-Ptrack-widget-creation=true',
|
||||||
'-Pshrink=true',
|
'-Pshrink=true',
|
||||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||||
'assembleRelease',
|
'assembleRelease',
|
||||||
|
|
Loading…
Reference in a new issue