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

Side by Side Diff: utils/pub/entrypoint.dart

Issue 12315059: Updated an error message to inform users that their packages were not installed (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 | « no previous file | utils/tests/pub/sdk_constraint_test.dart » ('j') | 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 entrypoint; 5 library entrypoint;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../../pkg/pathos/lib/path.dart' as path; 9 import '../../pkg/pathos/lib/path.dart' as path;
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 var errors = []; 186 var errors = [];
187 187
188 for (var pubspec in pubspecs) { 188 for (var pubspec in pubspecs) {
189 var sdkConstraint = pubspec.environment.sdkVersion; 189 var sdkConstraint = pubspec.environment.sdkVersion;
190 if (!sdkConstraint.allows(sdk.version)) { 190 if (!sdkConstraint.allows(sdk.version)) {
191 errors.add("- '${pubspec.name}' requires ${sdkConstraint}"); 191 errors.add("- '${pubspec.name}' requires ${sdkConstraint}");
192 } 192 }
193 } 193 }
194 194
195 if (errors.length > 0) { 195 if (errors.length > 0) {
196 log.error("Some packages are not compatible with your SDK version " 196 log.error("Some packages that were installed are not compatible with "
197 "${sdk.version}:\n" 197 "your SDK version ${sdk.version} and may not work:\n"
198 "${errors.join('\n')}\n\n" 198 "${errors.join('\n')}\n\n"
199 "You may be able to resolve this by upgrading to the latest Dart " 199 "You may be able to resolve this by upgrading to the latest Dart "
200 "SDK\n" 200 "SDK\n"
201 "or adding a version constraint to use an older version of a " 201 "or adding a version constraint to use an older version of a "
202 "package."); 202 "package.");
203 } 203 }
204 }); 204 });
205 } 205 }
206 206
207 /// Loads the list of concrete package versions from the `pubspec.lock`, if it 207 /// Loads the list of concrete package versions from the `pubspec.lock`, if it
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 /// Creates a symlink to the `packages` directory in [dir] if none exists. 294 /// Creates a symlink to the `packages` directory in [dir] if none exists.
295 Future _linkSecondaryPackageDir(String dir) { 295 Future _linkSecondaryPackageDir(String dir) {
296 return defer(() { 296 return defer(() {
297 var symlink = path.join(dir, 'packages'); 297 var symlink = path.join(dir, 'packages');
298 if (entryExists(symlink)) return; 298 if (entryExists(symlink)) return;
299 return createSymlink(packagesDir, symlink, relative: true); 299 return createSymlink(packagesDir, symlink, relative: true);
300 }); 300 });
301 } 301 }
302 } 302 }
OLDNEW
« no previous file with comments | « no previous file | utils/tests/pub/sdk_constraint_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698