      _compileRequestNeedsConfirmation = false;
      return _stdoutHandler.compilerOutput.future;
    }
-@@ -626,6 +660,7 @@ class ResidentCompiler {
+@@ -630,6 +664,7 @@ class ResidentCompiler {
    /// kernel file.
    void reset() {
      _server?.stdin?.writeln('reset');
 +    printTrace('<- reset');
    }
- 
+
    String _mapFilename(String filename, PackageUriMapper packageUriMapper) {
 diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart
 index 7940e8bb0..9e8b9bd45 100644

-      consumer(message);
     }
   }
 
@@ -106,6 +133,7 @@ class StdoutHandler {
     compilerMessageReceived = false;
     compilerOutput = Completer<CompilerOutput>();

+  StdoutState state = StdoutState.CollectDiagnostic;
   Completer<CompilerOutput> compilerOutput;
+  final List<Uri> sources = <Uri>[];

   bool _suppressCompilerMessages;

   void handler(String message) {
+    printTrace('-> $message');
     const String kResultPrefix = 'result ';
     if (boundaryKey == null && message.startsWith(kResultPrefix)) {
       boundaryKey = message.substring(kResultPrefix.length);
     } else if (message.startsWith(boundaryKey)) {
-      if (message.length <= boundaryKey.length) {
-        compilerOutput.complete(null);
