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

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

Issue 2184303002: Make pub strong-mode clean. (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/validator/dependency.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/validator/sdk_constraint.dart
diff --git a/lib/src/validator/sdk_constraint.dart b/lib/src/validator/sdk_constraint.dart
index aa57baaa31f89e54aaf2751a61523e4e9485bd10..479a1ddbf703053cfd804f857b5c91b15ef38901 100644
--- a/lib/src/validator/sdk_constraint.dart
+++ b/lib/src/validator/sdk_constraint.dart
@@ -21,7 +21,8 @@ class SdkConstraintValidator extends Validator {
Future validate() async {
var dartConstraint = entrypoint.root.pubspec.dartSdkConstraint;
- if (dartConstraint.toString().startsWith("^")) {
+ if (dartConstraint is VersionRange &&
+ dartConstraint.toString().startsWith("^")) {
errors.add(
"^ version constraints aren't allowed for SDK constraints since "
"older versions of pub don't support them.\n"
« no previous file with comments | « lib/src/validator/dependency.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698