Always re-solve directory dependencies#6843
Conversation
|
cf #3783 |
|
@dimbleby thank you for linking to the related issues. Please let me know what you think this PR needs, in particular if we want any tests I would appreciate some guidance along the lines of "please write a test similar to this existing test in this test file" since I'm having a little bit of trouble figuring out what the testing strategy is for the project. |
|
A test may look similar to poetry/tests/puzzle/test_solver.py Lines 3467 to 3468 in 5c578a2 (except that the directory dependency is updated even if a prior version is locked). |
|
@radoering test added, thanks for the pointer! |
radoering
left a comment
There was a problem hiding this comment.
After taking a closer look at the show command, I came to the conclusion that we don't want to re-solve path dependencies in any case. We only want to re-solve when refreshing the lock file but not when solving for a specific environment for show.
I think we have to try another approach: We shouldn't touch get_locked() but add path dependencies to use_latest when refreshing the lock file. If you want to try that approach, this should be the place to add packages with source type "directory" to use_latest:
poetry/src/poetry/installation/installer.py
Line 207 in 4a07b5e
6aed0a2 to
36088ff
Compare
|
@radoering ok I think I got that approach to work, thanks for the feedback! |
This resolves an issue poetry lock --no-update does not recognize updates made to a path dependency because it treats it as immutable
54b83d5 to
11600e3
Compare
|
@radoering thank you! |
|
Thanks for fixing this @adriangb! |
|
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. |
Resolves #3783
This resolves an issue poetry lock --no-update does not recognize updates made to a path dependency because it treats it as immutable
@neersighted this works in practice on a real project, but I'm a bit at a loss as to where to add this. I think it should go in
test_solver.py, but I think I'd have to re-create the dependencies manually by adding them to the repo, which seems tedious. Might need a bit of guidance there.