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

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

Issue 11363249: Fix error reporting on invalid command line args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/source.dart ('k') | utils/tests/pub/pub_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 /** 5 /**
6 * Attempts to resolve a set of version constraints for a package dependency 6 * Attempts to resolve a set of version constraints for a package dependency
7 * graph and select an appropriate set of best specific versions for all 7 * graph and select an appropriate set of best specific versions for all
8 * dependent packages. It works iteratively and tries to reach a stable 8 * dependent packages. It works iteratively and tries to reach a stable
9 * solution where the constraints of all dependencies are met. If it fails to 9 * solution where the constraints of all dependencies are met. If it fails to
10 * reach a solution after a certain number of iterations, it assumes the 10 * reach a solution after a certain number of iterations, it assumes the
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 /** 324 /**
325 * A constraint that a depending package places on a dependent package has 325 * A constraint that a depending package places on a dependent package has
326 * changed. 326 * changed.
327 * 327 *
328 * This is an abstract class that contains logic for updating the dependency 328 * This is an abstract class that contains logic for updating the dependency
329 * graph once a dependency has changed. Changing the dependency is the 329 * graph once a dependency has changed. Changing the dependency is the
330 * responsibility of subclasses. 330 * responsibility of subclasses.
331 */ 331 */
332 abstract class ChangeConstraint implements WorkItem { 332 abstract class ChangeConstraint implements WorkItem {
333 abstract Future process(VersionSolver solver); 333 Future process(VersionSolver solver);
334 334
335 abstract void undo(VersionSolver solver); 335 void undo(VersionSolver solver);
336 336
337 Future _processChange(VersionSolver solver, Dependency oldDependency, 337 Future _processChange(VersionSolver solver, Dependency oldDependency,
338 Dependency newDependency) { 338 Dependency newDependency) {
339 var name = newDependency.name; 339 var name = newDependency.name;
340 var source = oldDependency.source != null ? 340 var source = oldDependency.source != null ?
341 oldDependency.source : newDependency.source; 341 oldDependency.source : newDependency.source;
342 var description = oldDependency.description != null ? 342 var description = oldDependency.description != null ?
343 oldDependency.description : newDependency.description; 343 oldDependency.description : newDependency.description;
344 var oldConstraint = oldDependency.constraint; 344 var oldConstraint = oldDependency.constraint;
345 var newConstraint = newDependency.constraint; 345 var newConstraint = newDependency.constraint;
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 final description1; 724 final description1;
725 final description2; 725 final description2;
726 726
727 DescriptionMismatchException(this.package, this.description1, 727 DescriptionMismatchException(this.package, this.description1,
728 this.description2); 728 this.description2);
729 729
730 // TODO(nweiz): Dump to YAML when that's supported 730 // TODO(nweiz): Dump to YAML when that's supported
731 String toString() => "Package '$package' has conflicting descriptions " 731 String toString() => "Package '$package' has conflicting descriptions "
732 "'${JSON.stringify(description1)}' and '${JSON.stringify(description2)}'"; 732 "'${JSON.stringify(description1)}' and '${JSON.stringify(description2)}'";
733 } 733 }
OLDNEW
« no previous file with comments | « utils/pub/source.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698