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

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

Issue 1534093002: Improve the detection lockfile freshness. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years 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: lib/src/solver/version_solver.dart
diff --git a/lib/src/solver/version_solver.dart b/lib/src/solver/version_solver.dart
index c0607e70ed41fb1480e9e80015258bf0e6167903..0f89747f0246285440049ce5317492abb8f58b6d 100644
--- a/lib/src/solver/version_solver.dart
+++ b/lib/src/solver/version_solver.dart
@@ -75,6 +75,14 @@ class SolveResult {
/// because it found an invalid solution.
final int attemptedSolutions;
+ /// The [LockFile] representing the packages selected by this version
+ /// resolution.
+ LockFile get lockFile {
+ var sdkConstraint = new VersionConstraint.intersection(
+ pubspecs.values.map((pubspec) => pubspec.environment.sdkVersion));
+ return new LockFile(packages, _sources, sdkConstraint: sdkConstraint);
+ }
+
final SourceRegistry _sources;
final Package _root;
final LockFile _previousLockFile;

Powered by Google App Engine
This is Rietveld 408576698