[flutter_tools] remove globals from compilers (#59184)

Refactors KernelCompiler and ResidentCompiler to no longer use globals (except as a fallback for g3 migration). Improves the compilation error when running flutter test on a package without a flutter_test dependency.

Updates machine mode to output trace text to stderr
This commit is contained in:
Jonah Williams
2020-06-18 10:33:17 -07:00
committed by GitHub
parent e1f4cfb4f4
commit 447e3d3f38
17 changed files with 281 additions and 162 deletions

View File

@@ -128,7 +128,15 @@ Future<void> main(List<String> args) async {
// The mustache dependency is different in google3
TemplateRenderer: () => const MustacheTemplateRenderer(),
if (daemon)
Logger: () => NotifyingLogger(verbose: verbose)
Logger: () => NotifyingLogger(
verbose: verbose,
parent: VerboseLogger(StdoutLogger(
timeoutConfiguration: timeoutConfiguration,
stdio: globals.stdio,
terminal: globals.terminal,
outputPreferences: globals.outputPreferences,
),
))
else if (verbose && !muteCommandLogging)
Logger: () => VerboseLogger(StdoutLogger(
timeoutConfiguration: timeoutConfiguration,