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

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

Issue 74013007: Hook up dependency overrides to the rest of pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 1 month 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
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 bcef655b914a6e5a1fc6eb1d298d0ae2a7e2642a..c5c5c1aff278d5aa49304c78a559975442034eea 100644
--- a/sdk/lib/_internal/pub/lib/src/pubspec.dart
+++ b/sdk/lib/_internal/pub/lib/src/pubspec.dart
@@ -102,6 +102,18 @@ class Pubspec {
}
List<PackageDep> _devDependencies;
+ /// The dependency constraints that this package overrides when it is the
+ /// root package.
+ ///
+ /// Dependencies here will replace any dependency on a package with the same
+ /// name anywhere in the dependency graph.
+ List<PackageDep> get dependencyOverrides {
+ if (_dependencyOverrides != null) return _dependencyOverrides;
+ _dependencyOverrides = _parseDependencies('dependency_overrides');
+ return _dependencyOverrides;
+ }
+ List<PackageDep> _dependencyOverrides;
+
/// The ids of the transformers to use for this package.
List<Set<TransformerId>> get transformers {
if (_transformers != null) return _transformers;
@@ -220,7 +232,8 @@ class Pubspec {
}
Pubspec(this._name, this._version, this._dependencies, this._devDependencies,
- this._environment, this._transformers, [Map fields])
+ this._dependencyOverrides, this._environment, this._transformers,
+ [Map fields])
: this.fields = fields == null ? {} : fields,
_sources = null,
_location = null;
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/package.dart ('k') | sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698