-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse locked package info for vcs/file/url deps #2720
Conversation
6fc2895
to
1bae63a
Compare
Prior to this change, when add/remove/lock commands were executed, poetry would re-inspect all locked vcs/file/url dependencies. This is sub-optimal and not required. This change enables reuse of locked package info.
1bae63a
to
677e0e1
Compare
I gave this a shot to see how it compares to the solution in #2327 as I am all game to kill it. Couple issues I ran into while testing.
After using the work around with the upgraded package, doing a poetry install did not downgrade the installed git dependency to the locked version. The second issue is pretty critical in my eyes at least as this would then not respect the lock file in a different way than it does currently of always updating to latest. |
@@ -67,6 +68,11 @@ def __init__( | |||
self._in_progress = False | |||
self._overrides = {} | |||
self._deferred_cache = {} | |||
self._locked_packages = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is the right place to put this.
We already have a locked system in the VersionSolver
class, so we might be able to fix and improve it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a whack at that; I was going for the lowest possible place to put this logic otherwise we will end up re-implementing the logic at multiple places. It might also be a good idea to re-work the structure a bit for 2.x
.
Closing in favour of #3875. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Prior to this change, when add/remove/lock commands were executed,
poetry would re-inspect all locked vcs/file/url dependencies. This is
sub-optimal and not required. This change enables reuse of locked
package info.
Might Resolves: #1614
Closes: #2327 #2325
Pull Request Check List