From da71e6e93d78d362b9200cecaa493f4f71c2ebe8 Mon Sep 17 00:00:00 2001 From: Nate Biggs Date: Mon, 7 Oct 2024 16:06:18 -0400 Subject: [PATCH] Update 'dump-info' usage for dart2js builds (#156187) Dart2js updated its CLI to support generating a 'dump-info' json file by passing a "--stage" option. The "dump-info-all" stage performs a full compilation (from the provided dill) and then also generates the dump info file. Tested via the `flutter-dev` CLI locally. This results in the same output but with the addition of an extra `main.dart.js.info.json` file. --- packages/flutter_tools/lib/src/web/compiler_config.dart | 2 +- .../test/general.shard/build_system/targets/web_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/web/compiler_config.dart b/packages/flutter_tools/lib/src/web/compiler_config.dart index 88f81c8a5f9..aa346df4fbe 100644 --- a/packages/flutter_tools/lib/src/web/compiler_config.dart +++ b/packages/flutter_tools/lib/src/web/compiler_config.dart @@ -115,7 +115,7 @@ class JsCompilerConfig extends WebCompilerConfig { if (buildMode != BuildMode.release) '--no-minify', ...toSharedCommandOptions(buildMode), '-O$optimizationLevel', - if (dumpInfo) '--dump-info', + if (dumpInfo) '--stage=dump-info-all', if (noFrequencyBasedMinification) '--no-frequency-based-minification', if (csp) '--csp', ]; diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart index 5a174789b50..3179ff787f8 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart @@ -953,7 +953,7 @@ void main() { '--no-minify', '--no-source-maps', '-O4', - '--dump-info', + '--stage=dump-info-all', '-o', environment.buildDir.childFile('main.dart.js').absolute.path, environment.buildDir.childFile('app.dill').absolute.path,