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