Return and track affected and culprit on conflicts #39
+171
−52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the child of #36 and pubgrub-rs#291, providing an implementation that works for both cargo and uv. Upstream PR: pubgrub-rs#298.
Specifically, we use the returned incompatibility in astral-sh/uv#9843, but not
PackageResolutionStatistics
.Whenever we either discard a version due to its dependencies or perform conflict resolution, we return the last conflict that led to discarding them.
In cargo, we use this information for prioritization, which speeds up resolution (
cargo run -r -- -m pub --with-solana --filter solana-archiver-lib -t 16
goes from 90s to 20s on my machine).Configurations that are noticeably slower for the solana test case:
add_version
In uv, we use this to re-prioritize and backtrack when a package decision accumulated to many conflicts. Since we have our own solver loop, we add the incompatibility to our own tracking instead.
Built on pubgrub-rs#291
Benchmarks
Main:
With pubgrub-rs#291:
This PR: