anchor.diff:          {bool isRoot: false}) {
         var name = yaml['name'];
         assert(!nodes.containsKey(name));
  -      var node = new PackageNode._(name, yaml['version'], type);
  +      var node = new PackageNode._(
  +          name, yaml['version'], type, packageLocations[name]);
         nodes[name] = node;
   
         _depsFromYaml(yaml, withOverrides: isRoot).forEach((name, source) {
  
positive.code:   /// The root application package.
    final PackageNode root;
  
    /// All the package dependencies of [root], transitive and direct.
    Set<PackageNode> get allPackages {
      var seen = new Set<PackageNode>()..add(root);
  
      void addDeps(PackageNode package) {
        for (var dep in package.dependencies) {
          if (seen.contains(dep)) continue;
          seen.add(dep);
          addDeps(dep);
        }
      }
      addDeps(root);
  
      return seen;
    }
  
    PackageGraph._(this.root);
  
    /// Creates a [PackageGraph] for the package in which you are currently
    /// running.
  
negative.code:     /// Read in the pubspec file and parse it as yaml.
      var pubspec = new File('pubspec.yaml');
      if (!pubspec.existsSync()) {
        throw 'Unable to generate package graph, no `pubspec.yaml` found. '
            'This program must be ran from the root directory of your package.';
      }
      var yaml = loadYaml(pubspec.readAsStringSync());
  
      /// Read in the `.packages` file to get the locations of all packages.
      var packagesFile = new File('.packages');
      if (!packagesFile.existsSync()) {
        throw 'Unable to generate package graph, no `.packages` found. '
            'This program must be ran from the root directory of your package.';
      }
      var packageLocations = <String, Uri>{};
      packagesFile.readAsLinesSync().skip(1).forEach((line) {
  