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

Unified Diff: utils/pub/pubspec.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/pub.dart ('k') | utils/pub/sdk_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/pubspec.dart
diff --git a/utils/pub/pubspec.dart b/utils/pub/pubspec.dart
index 8a1931dc6f77ab1ee6268411507751c5dcdf1ecb..078b7e05dc83c3c9271cf4ac09d6796f3344179f 100644
--- a/utils/pub/pubspec.dart
+++ b/utils/pub/pubspec.dart
@@ -133,7 +133,7 @@ List<PackageRef> _parseDependencies(SourceRegistry sources, yaml) {
// Allow an empty dependencies key.
if (yaml == null) return dependencies;
- if (yaml is! Map || yaml.keys.some((e) => e is! String)) {
+ if (yaml is! Map || yaml.keys.any((e) => e is! String)) {
throw new FormatException(
'The pubspec dependencies should be a map of package names, but '
'was ${yaml}.');
@@ -154,7 +154,7 @@ List<PackageRef> _parseDependencies(SourceRegistry sources, yaml) {
versionConstraint = new VersionConstraint.parse(spec.remove('version'));
}
- var sourceNames = spec.keys;
+ var sourceNames = spec.keys.toList();
if (sourceNames.length > 1) {
throw new FormatException(
'Dependency $name may only have one source: $sourceNames.');
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/pub/sdk_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698