anchor.diff:  import 'package:meta/meta.dart';
   import 'package:path/path.dart' as p;
   import 'package:scratch_space/scratch_space.dart';
  +import 'package:graphs/graphs.dart' show crawlAsync;
   
   import 'common.dart';
   import 'errors.dart';
  
positive.code:   }
  }
  
  /// Adds the source or kernel dependencies for [root] to
  /// [transitiveKernelDeps] or [transitiveSourceDeps].
  Future<void> _addModuleDeps(
      Module root,
      List<AssetId> transitiveKernelDeps,
      List<AssetId> transitiveSourceDeps,
      BuildStep buildStep,
      String outputExtension) async {
    final toCrawl = Queue.of([root.primarySource]);
    final nodes = {root.primarySource: _ModuleNode(root, true)};
  
    // Helper for any time we encounter a module which is provided via source and
    // not kernel.
    //
    // For each of those we have to ensure that all parents of that module are
    // provided via source as well.
    void updateParents(AssetId nodeId) {
      var node = nodes[nodeId];
      for (var parent in node.parents) {
        var parentNode = nodes[parent];
        if (!parentNode.sourceOnly) {
          parentNode.sourceOnly = true;
          parentNode.parents.forEach(updateParents);
        }
      }
    }
  
    // Builds the module graph, the `sourceOnly` property of nodes gets
    // incrementally updated so we need to wait until we are done to actually
    // provide the deps.
    while (toCrawl.isNotEmpty) {
      var moduleId = toCrawl.removeLast();
      var node = nodes[moduleId];
      for (final dep in node.module.directDependencies) {
        var depNode = nodes[dep];
        if (depNode == null) {
          toCrawl.add(dep);
          var depKernelId = dep.changeExtension(outputExtension);
          var sourceOnly = !await buildStep.canRead(depKernelId);
          var depModule = Module.fromJson(json.decode(
                  await buildStep.readAsString(
                      dep.changeExtension(moduleExtension(root.platform))))
              as Map<String, dynamic>);
          depNode = _ModuleNode(depModule, sourceOnly);
          nodes[dep] = depNode;
        }
        depNode.parents.add(moduleId);
        if (depNode.sourceOnly && !node.sourceOnly) {
          node.sourceOnly = true;
          updateParents(node.id);
        }
      }
    }
  
    for (var node in nodes.values) {
      if (node.module == root) continue;
      if (node.sourceOnly) {
        transitiveSourceDeps.addAll(node.module.sources);
      } else {
        transitiveKernelDeps.add(node.id.changeExtension(outputExtension));
      }
    }
  }
  
  /// Fills in all the required arguments for [request] in order to compile the
  
negative.code:   File packagesFile;
  
    await buildStep.trackStage('CollectDeps', () async {
      var kernelDeps = <AssetId>[];
      var sourceDeps = <AssetId>[];
  
      await _findModuleDeps(
          module, kernelDeps, sourceDeps, buildStep, outputExtension);
  
      var allAssetIds = Set<AssetId>()
        ..addAll(module.sources)
        ..addAll(kernelDeps)
        ..addAll(sourceDeps);
      await scratchSpace.ensureAssets(allAssetIds, buildStep);
  
      packagesFile = await createPackagesFile(allAssetIds);
  
      _addRequestArguments(request, module, kernelDeps, dartSdkDir, sdkKernelPath,
          outputFile, packagesFile, summaryOnly);
    });
  
    // We need to make sure and clean up the temp dir, even if we fail to compile.
  