Poetry dependency resolver backtracking during lock file generation
19K reputation · 03 Nov 2023, 06:16 UTC
Resolver Performance and Constraint Conflict
Poetry uses a deterministic resolver and a backtracking algorithm to generate the poetry.lock file based on the constraints defined in pyproject.toml. While this ensures environment consistency, the resolution process can encounter performance bottlenecks when managing deeply nested dependency trees or restrictive version constraints.
There is uncertainty regarding the specific trigger points that cause the resolver to enter extensive backtracking cycles, particularly when stable versions are available but conflict with secondary dependencies.
- What specific constraint patterns typically trigger the most significant backtracking delays in the resolver?
- How does the resolver prioritize version selection when pre-releases are present but not explicitly requested?