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

Unified Diff: sdk/lib/_internal/pub/lib/src/pubspec.dart

Issue 302313007: Attach source range information to parsed YAML nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 6 years, 7 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 | « sdk/lib/_internal/pub/lib/src/barback.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/pubspec.dart
diff --git a/sdk/lib/_internal/pub/lib/src/pubspec.dart b/sdk/lib/_internal/pub/lib/src/pubspec.dart
index 9a4d3e34930a1b091f4cb0a2026d4b01cc385fe0..8c29253492e1c754900e84665afdd90622c3ac0a 100644
--- a/sdk/lib/_internal/pub/lib/src/pubspec.dart
+++ b/sdk/lib/_internal/pub/lib/src/pubspec.dart
@@ -357,6 +357,9 @@ class Pubspec {
sourceName = _sources.defaultSource.name;
versionConstraint = _parseVersionConstraint(spec, "$field.$name");
} else if (spec is Map) {
+ // Don't write to the immutable YAML map.
+ spec = new Map.from(spec);
+
if (spec.containsKey('version')) {
versionConstraint = _parseVersionConstraint(spec.remove('version'),
"$field.$name.version");
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698