anchor.diff:          sb.writeln('$packageName:$directoryUriOnDevice');
         }
       }
  -    if (previewDart2) {
  -      // When in previewDart2 mode we don't update .packages-file entry
  -      // so actual file will get invalidated in frontend.
  -      // We don't need to synthesize device-correct .packages file because
  -      // it is not going to be used on the device anyway - compilation
  -      // is done on the host.
  -      return;
  -    }
  -    if (sb != null) {
  -      final DevFSContent content = _entries[fs.path.toUri('.packages')];
  -      if (content is DevFSStringContent && content.string == sb.toString()) {
  -        content._exists = true;
  -        return;
  -      }
  -      _entries[fs.path.toUri('.packages')] = new DevFSStringContent(sb.toString());
  -    }
     }
   }
   /// Converts a platform-specific file path to a platform-independent Uri path.
  
positive.code:     await _scanDirectory(rootDirectory,
                           recursive: true,
                           fileFilter: fileFilter);
      final bool previewDart2 = generator != null;
      if (fs.isFileSync(_packagesFilePath)) {
        printTrace('Scanning package files');
        await _scanPackages(fileFilter, previewDart2);
      }
      if (bundle != null) {
        printTrace('Scanning asset files');
  
negative.code:     );
    }
  
    Future<Null> _scanPackages(Set<String> fileFilter) async {
      StringBuffer sb;
      final PackageMap packageMap = new PackageMap(_packagesFilePath);
  
  