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

Unified Diff: sdk/lib/_internal/pub/lib/src/solver/version_solver.dart

Issue 491993002: Don't recompile dependency executables that haven't changed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 4 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
Index: sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
diff --git a/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart b/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
index ec276ea22d0911d0c8185405897348840e056534..fa2aae0bcc68beccfcff54f204af147cdb6ab156 100644
--- a/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
+++ b/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
@@ -75,6 +75,22 @@ class SolveResult {
final Package _root;
final LockFile _previousLockFile;
+ /// Returns the names of all packages that were changed.
+ ///
+ /// This includes packages that were added or removed.
+ Set<String> get changedPackages {
+ if (packages == null) return null;
+
+ var changed = packages
+ .where((id) =>
+ !_sources.idsEqual(_previousLockFile.packages[id.name], id))
+ .map((id) => id.name).toSet();
+
+ return changed.union(_previousLockFile.packages.keys
+ .where((package) => !availableVersions.containsKey(package))
+ .toSet());
+ }
+
SolveResult.success(this._sources, this._root, this._previousLockFile,
this.packages, this.overrides, this.availableVersions,
this.attemptedSolutions)
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/solver/solve_report.dart ('k') | sdk/lib/_internal/pub/lib/src/source_registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698