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

Unified Diff: utils/tests/pub/sdk_constraint_test.dart

Issue 12211061: Handle circular dependencies on the root package when checking SDK constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/system_cache.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/sdk_constraint_test.dart
diff --git a/utils/tests/pub/sdk_constraint_test.dart b/utils/tests/pub/sdk_constraint_test.dart
index 3f934b97b1dd747a1bb9d3d99250cdfa1858d042..33d46862774a1257ddc7cb259157a0934702e1b7 100644
--- a/utils/tests/pub/sdk_constraint_test.dart
+++ b/utils/tests/pub/sdk_constraint_test.dart
@@ -117,5 +117,40 @@ main() {
or adding a version constraint to use an older version of a package.
""");
});
+
+ integration("handles a circular dependency on the root package", () {
+ // Using an SDK source, but this should be true of all sources.
+ dir(sdkPath, [
+ dir("pkg", [
+ dir("foo", [
+ libPubspec("foo", "0.0.1", sdk: ">3.0.0", deps: [
+ {"sdk": "myapp"}
+ ]),
+ libDir("foo")
+ ])
+ ])
+ ]).scheduleCreate();
+
+ dir(appPath, [
+ pubspec({
+ "name": "myapp",
+ "dependencies": {
+ "foo": { "sdk": "foo" }
+ },
+ "environment": {"sdk": ">2.0.0"}
+ })
+ ]).scheduleCreate();
+
+ schedulePub(args: [command],
+ error:
+ """
+ Some packages are not compatible with your SDK version 0.1.2+3:
+ - 'myapp' requires >2.0.0
+ - 'foo' requires >3.0.0
+
+ You may be able to resolve this by upgrading to the latest Dart SDK
+ or adding a version constraint to use an older version of a package.
+ """);
+ });
}
}
« no previous file with comments | « utils/pub/system_cache.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698