Index: utils/pub/version_solver.dart |
diff --git a/utils/pub/version_solver.dart b/utils/pub/version_solver.dart |
index c00cda5f533ff5a1e3766a335eb47abb0c7cf588..3cb3230b9a9f5af3c33726d35a82a0e9385f00dd 100644 |
--- a/utils/pub/version_solver.dart |
+++ b/utils/pub/version_solver.dart |
@@ -183,7 +183,8 @@ class VersionSolver { |
for (var dependerName in dependency.dependers) { |
var depender = getDependency(dependerName); |
var locked = lockFile.packages[dependerName]; |
- if (locked != null && depender.version == locked.version) { |
+ if (locked != null && depender.version == locked.version && |
+ lockedPackage.source.name == dep.source.name) { |
enqueue(new UnlockPackage(depender)); |
return true; |
} |
@@ -360,7 +361,7 @@ abstract class ChangeConstraint implements WorkItem { |
// If the dependency is on a package in the lockfile, use the lockfile's |
// version for that package if it's valid given the other constraints. |
var lockedPackage = solver.lockFile.packages[name]; |
- if (lockedPackage != null) { |
+ if (lockedPackage != null && newDependency.source == lockedPackage.source) { |
var lockedVersion = lockedPackage.version; |
if (newConstraint.allows(lockedVersion)) { |
solver.enqueue( |