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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/pub/system_cache.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library check_sdk_test; 5 library check_sdk_test;
6 6
7 import "test_pub.dart"; 7 import "test_pub.dart";
8 import "../../../pkg/unittest/lib/unittest.dart"; 8 import "../../../pkg/unittest/lib/unittest.dart";
9 9
10 main() { 10 main() {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 schedulePub(args: [command], 110 schedulePub(args: [command],
111 error: 111 error:
112 """ 112 """
113 Some packages are not compatible with your SDK version 0.1.2+3: 113 Some packages are not compatible with your SDK version 0.1.2+3:
114 - 'bar' requires <0.1.1 114 - 'bar' requires <0.1.1
115 115
116 You may be able to resolve this by upgrading to the latest Dart SDK 116 You may be able to resolve this by upgrading to the latest Dart SDK
117 or adding a version constraint to use an older version of a package. 117 or adding a version constraint to use an older version of a package.
118 """); 118 """);
119 }); 119 });
120
121 integration("handles a circular dependency on the root package", () {
122 // Using an SDK source, but this should be true of all sources.
123 dir(sdkPath, [
124 dir("pkg", [
125 dir("foo", [
126 libPubspec("foo", "0.0.1", sdk: ">3.0.0", deps: [
127 {"sdk": "myapp"}
128 ]),
129 libDir("foo")
130 ])
131 ])
132 ]).scheduleCreate();
133
134 dir(appPath, [
135 pubspec({
136 "name": "myapp",
137 "dependencies": {
138 "foo": { "sdk": "foo" }
139 },
140 "environment": {"sdk": ">2.0.0"}
141 })
142 ]).scheduleCreate();
143
144 schedulePub(args: [command],
145 error:
146 """
147 Some packages are not compatible with your SDK version 0.1.2+3:
148 - 'myapp' requires >2.0.0
149 - 'foo' requires >3.0.0
150
151 You may be able to resolve this by upgrading to the latest Dart SDK
152 or adding a version constraint to use an older version of a package.
153 """);
154 });
120 } 155 }
121 } 156 }
OLDNEW
« 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