anchor.diff:          // store them again.
           await _updatePackageSortIndex(package.key);
   
  -        return PackageVersion(newVersion.package, newVersion.version,
  +        return pub_server.PackageVersion(newVersion.package, newVersion.version,
               newVersion.pubspec.jsonString);
         } catch (error, stack) {
           _logger.warning('Error while committing: $error, $stack');
  
positive.code:   }
  
    Future<void> _validatePackageUploader(
        String packageName, models.Package package, String userId) async {
      // Fail if package doesn't exist.
      if (package == null) {
        throw NotFoundException.resource(packageName);
  
negative.code:     );
  
      if (!status.emailSent) {
        throw pub_server.GenericProcessingException(
            'Previous invite is still active, next notification can be sent '
            'on ${status.nextNotification.toIso8601String()}.');
      }
  
      throw pub_server.GenericProcessingException(
          'We have sent an invitation to $uploaderEmail, '
          'they will be added as uploader after they confirm it.');
    }
  