-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
poetry lock --no-update does not reflect directory packages changes #3783
Comments
I had a look at fixing this. It might be an option to change the diff --git a/poetry/puzzle/solver.py b/poetry/puzzle/solver.py
index 7465df1b..fe3f26fd 100644
--- a/poetry/puzzle/solver.py
+++ b/poetry/puzzle/solver.py
@@ -245,9 +245,14 @@ class Solver:
if self._provider._overrides:
self._overrides.append(self._provider._overrides)
+ if use_latest is None:
+ use_latest = []
+
locked = {}
for package in self._locked.packages:
locked[package.name] = DependencyPackage(package.to_dependency(), package)
+ if package.source_type == "directory":
+ # NOTE: we could be less strict here and only append these in case the use didn't
+ # specify any `use_latest` packages. That means that `poetry update arrow` will not
+ # pull in directory package changes.
+ use_latest.append(package.name)
try:
result = resolve_version( Let me know if there are better solutions to this. I would like to create a PR to fix this issue. :) I see that the code snippet doesn't cover |
Yay! FYI @madsnedergaard @FelixDQ not sure if we still have the poetry update script, but it seems some of it can be removed with the next Poetry version. |
Hurray, thanks for the ping! ❤️ And thanks @adriangb for fixing it! 👏 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
When using packages with the directory source type, I would expect that running
poetry lock --no-update
inside the package would update thepoetry.lock
file with changes for all directory packages being used.The issue can be reproduced with:
To my knowledge the only workaround are:
poetry update
(which naturally updates more than we want here – i.e. unrelated dependencies)poetry update <dir_package1> <dir_package2>...
(cumbersome if you have a lot of directory packages – especially painful in a big mono repository)I believe the suggested behavior makes sense for both editable and non-editable directory packages.
The text was updated successfully, but these errors were encountered: