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

Unified Diff: lib/src/validator/dependency.dart

Issue 2165423002: Add support for Flutter SDK constraints. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 5 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 | « lib/src/solver/version_solver.dart ('k') | lib/src/validator/sdk_constraint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/validator/dependency.dart
diff --git a/lib/src/validator/dependency.dart b/lib/src/validator/dependency.dart
index 9d14476f9239dca9ca45bc47a7adff8a679a88d5..a4fdf636f0d202ab1be24758947d38f6990128e6 100644
--- a/lib/src/validator/dependency.dart
+++ b/lib/src/validator/dependency.dart
@@ -29,7 +29,7 @@ final _postCaretPubVersions = new VersionConstraint.parse("^1.8.0");
class DependencyValidator extends Validator {
/// Whether the SDK constraint guarantees that `^` version constraints are
/// safe.
- bool get _caretAllowed => entrypoint.root.pubspec.environment.sdkVersion
+ bool get _caretAllowed => entrypoint.root.pubspec.dartSdkConstraint
.intersect(_preCaretPubVersions).isEmpty;
DependencyValidator(Entrypoint entrypoint)
@@ -174,7 +174,7 @@ class DependencyValidator extends Validator {
/// Emits an error for any version constraints that use `^` without an
/// appropriate SDK constraint.
void _errorAboutCaretConstraints(List<PackageDep> caretDeps) {
- var newSdkConstraint = entrypoint.root.pubspec.environment.sdkVersion
+ var newSdkConstraint = entrypoint.root.pubspec.dartSdkConstraint
.intersect(_postCaretPubVersions);
if (newSdkConstraint.isEmpty) newSdkConstraint = _postCaretPubVersions;
« no previous file with comments | « lib/src/solver/version_solver.dart ('k') | lib/src/validator/sdk_constraint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698