Skip to content

Commit

Permalink
add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Oct 30, 2022
1 parent dcc0f2c commit 54b83d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/poetry/installation/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def _do_refresh(self) -> int:
self._io,
)

# Always re-solve directory dependencies, otherwise we can't determine
# if anything has changed (and the lock file contains an invalid version).
use_latest = [
p.name for p in locked_repository.packages if p.source_type == "directory"
]
Expand Down
6 changes: 6 additions & 0 deletions tests/console/commands/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ def test_lock_no_update_path_dependencies(
poetry_with_nested_path_deps_old_lockfile: Poetry,
repo: TestRepository,
):
"""
The lock file contains a variant of the directory dependency "quix" that does
not depend on "sampleproject". Although the version of "quix" has not been changed,
it should be re-solved because there is always only one valid version
of a directory dependency at any time.
"""
repo.add_package(get_package("sampleproject", "1.3.1"))

locker = Locker(
Expand Down

0 comments on commit 54b83d5

Please sign in to comment.