Skip to content

Commit

Permalink
add debug trace when compiling dart2js (#116238)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherfujino committed Nov 30, 2022
1 parent c461f4f commit 24b3c38
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/flutter_tools/lib/src/build_system/targets/web.dart
Expand Up @@ -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(<String>[
final List<String> compilationArgs = <String>[
...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));
}
Expand Down

0 comments on commit 24b3c38

Please sign in to comment.