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

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

Issue 11931040: adds file path source to pub (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase to newest as of 5 min ago 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/system_cache.dart ('k') | utils/tests/pub/install/path/absolute_path_test.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 18cff6624b013321e2dc78b7713349f05f89e5f1..5b3634813086fc18e7c03d81a08a29d524224216 100644
--- a/utils/pub/validator/dependency.dart
+++ b/utils/pub/validator/dependency.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -8,6 +8,7 @@ import 'dart:async';
import '../entrypoint.dart';
import '../hosted_source.dart';
+import '../path_source.dart';
import '../http.dart';
import '../package.dart';
import '../utils.dart';
@@ -21,6 +22,11 @@ class DependencyValidator extends Validator {
Future validate() {
return Future.forEach(entrypoint.root.pubspec.dependencies, (dependency) {
+ if (dependency.source is PathSource){
+ errors.add('"${dependency.name}" dependancy package must be defined '
+ 'using "hosted" or "git" source.');
+ return new Future.immediate(null);
+ }
if (dependency.source is! HostedSource) {
return _warnAboutSource(dependency);
}
« no previous file with comments | « utils/pub/system_cache.dart ('k') | utils/tests/pub/install/path/absolute_path_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698