Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: utils/pub/validator/dependency.dart

Issue 11785028: Commit Martin's patch for pub + lib_v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/validator.dart ('k') | utils/pub/validator/directory.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/validator/dependency.dart
diff --git a/utils/pub/validator/dependency.dart b/utils/pub/validator/dependency.dart
index 46cde9acc690c2094cd8286bf2dd5fc8833a8a33..378cb6fd7de2e422b649ce20811da655842b8bea 100644
--- a/utils/pub/validator/dependency.dart
+++ b/utils/pub/validator/dependency.dart
@@ -4,6 +4,8 @@
library dependency_validator;
+import 'dart:async';
+
import '../entrypoint.dart';
import '../hosted_source.dart';
import '../http.dart';
@@ -47,8 +49,8 @@ class DependencyValidator extends Validator {
Future _warnAboutSource(PackageRef ref) {
return entrypoint.cache.sources['hosted']
.getVersions(ref.name, ref.name)
- .transformException((e) => <Version>[])
- .transform((versions) {
+ .catchError((e) => <Version>[])
+ .then((versions) {
var constraint;
var primary = Version.primary(versions);
if (primary != null) {
@@ -73,7 +75,7 @@ class DependencyValidator extends Validator {
/// Warn that dependencies should have version constraints.
Future _warnAboutConstraint(PackageRef ref) {
- return entrypoint.loadLockFile().transform((lockFile) {
+ return entrypoint.loadLockFile().then((lockFile) {
var message = 'Your dependency on "${ref.name}" should have a version '
'constraint.';
var locked = lockFile.packages[ref.name];
« no previous file with comments | « utils/pub/validator.dart ('k') | utils/pub/validator/directory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698