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

Unified Diff: lib/src/solver/solve_report.dart

Issue 2079303003: Track Source objects in PackageNames. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 6 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/solver/backtracking_solver.dart ('k') | lib/src/solver/version_solver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/solver/solve_report.dart
diff --git a/lib/src/solver/solve_report.dart b/lib/src/solver/solve_report.dart
index a6794d35c288a4b64905ca1022cba3bb9a059859..367d963a255a84a69ba7a965a08997ceeb2e61d0 100644
--- a/lib/src/solver/solve_report.dart
+++ b/lib/src/solver/solve_report.dart
@@ -62,7 +62,7 @@ class SolveReport {
if (newId == null) return true;
// The dependency existed before, so see if it was modified.
- return !_sources.idsEqual(oldId, newId);
+ return oldId != newId;
}).length;
if (dryRun) {
@@ -167,7 +167,7 @@ class SolveReport {
} else if (oldId == null) {
icon = log.green("+ ");
addedOrRemoved = true;
- } else if (!_sources.idDescriptionsEqual(oldId, newId)) {
+ } else if (!oldId.samePackage(newId)) {
icon = log.cyan("* ");
changed = true;
} else if (oldId.version < newId.version) {
@@ -238,9 +238,8 @@ class SolveReport {
void _writeId(PackageId id) {
_output.write(id.version);
- var source = _sources[id.source];
- if (source != _sources.defaultSource) {
- var description = source.formatDescription(_root.dir, id.description);
+ if (id.source != _sources.defaultSource) {
+ var description = id.source.formatDescription(_root.dir, id.description);
_output.write(" from ${id.source} $description");
}
}
« no previous file with comments | « lib/src/solver/backtracking_solver.dart ('k') | lib/src/solver/version_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698