Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

abn
Copy link
Member

@abn abn commented Jul 24, 2020

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

  • Added tests for changed code.
  • Updated documentation for changed code.

@abn abn requested a review from a team July 24, 2020 17:41
@abn abn force-pushed the reuse-locked-packages branch 3 times, most recently from 6fc2895 to 1bae63a Compare July 25, 2020 15:00
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.
@abn abn linked an issue Jul 26, 2020 that may be closed by this pull request
3 tasks
@wakemaster39
Copy link

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.

poetry update does not update git dependencies, that is a feature that would be beneficial. Work around was deleting the poetry lock file.

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 = {}
Copy link
Member

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.

Copy link
Member Author

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.

@abn abn marked this pull request as draft August 10, 2020 23:49
@wakemaster39
Copy link

@abn is there anything I can help with either this PR or #2327 to keep things moving? This is a pretty annoying problem with the git lock not being respected I have to keep working around.

@abn
Copy link
Member Author

abn commented Apr 5, 2021

Closing in favour of #3875.

@abn abn closed this Apr 5, 2021
Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git Dependencies do not respect lock file Update the lock file without upgrading dependencies
3 participants