anchor.diff:    }
   
     Future<DependencyReference> _createDependencyReference(
  -      Project project, DependencyType type, bool useGitIfNotHosted) async {
  +      Project project,
  +      DependencyType type,
  +      bool useGitIfNotHosted,
  +      Set<String> exportedDependencyNames) async {
       switch (type) {
         case DependencyType.path:
           return new PathReference(project.installDirectory.path);
  
positive.code: //    }
  
      final newDependencies = new Map.from(project.pubspec.dependencies);
  
      await Future.wait(dependencies.map((p) async {
        final ref = await _createDependencyReference(p, type, useGitIfNotHosted);
        _log.finest('created reference $ref to project ${p.name}');
        newDependencies[p.name] = ref;
      }));
  
negative.code:             project.gitUri, await project.currentGitCommitHash);
  
        case DependencyType.hosted:
          return _getHostedReference(
              project, useGitIfNotHosted, exportedDependencyNames);
  
        default:
          throw new StateError('unsupported type $type');
      }
    }
  
    Future<DependencyReference> _getHostedReference(Project project,
        bool useGitIfNotHosted, Set<String> exportedDependencyNames) async {
      final Option<HostedPackageVersions> packageVersionsOpt =
          await pub.fetchPackageVersions(project.name);
      if (packageVersionsOpt is Some) {
        final Version version = packageVersionsOpt.get().versions.last.version;
        final isExported = exportedDependencyNames.contains(project.name);
        final versionConstraint = isExported
  