From 24b3c384c2e5e0cf8fc6f1a24cc0e4297100403c Mon Sep 17 00:00:00 2001 From: Christopher Fujino Date: Wed, 30 Nov 2022 11:04:59 -0800 Subject: [PATCH] add debug trace when compiling dart2js (#116238) --- .../lib/src/build_system/targets/web.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/build_system/targets/web.dart b/packages/flutter_tools/lib/src/build_system/targets/web.dart index 5f116c740d98..995023d14926 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/web.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/web.dart @@ -208,16 +208,19 @@ class Dart2JSTarget extends Target { '--no-source-maps', ]; - // Run the dart2js compilation in two stages, so that icon tree shaking can - // parse the kernel file for web builds. - final ProcessResult kernelResult = await globals.processManager.run([ + final List compilationArgs = [ ...sharedCommandOptions, '-o', environment.buildDir.childFile('app.dill').path, '--packages=.dart_tool/package_config.json', '--cfe-only', environment.buildDir.childFile('main.dart').path, // dartfile - ]); + ]; + globals.printTrace('compiling dart code to kernel with command "${compilationArgs.join(' ')}"'); + + // Run the dart2js compilation in two stages, so that icon tree shaking can + // parse the kernel file for web builds. + final ProcessResult kernelResult = await globals.processManager.run(compilationArgs); if (kernelResult.exitCode != 0) { throw Exception(_collectOutput(kernelResult)); }