pubgrub-rs / pubgrub

PubGrub version solving algorithm implemented in Rust
https://pubgrub-rs.github.io/pubgrub/pubgrub/
Mozilla Public License 2.0
337 stars 29 forks source link

Move formatting of explanations into the report formatter #214

Closed konstin closed 1 month ago

konstin commented 1 month ago

Move the explanation formatting from DefaultStringReporter to the ReportFormatter trait, so they can be overridden downstream (https://github.com/astral-sh/uv/blob/20e9589662396ca655e253c48afe7c60e05a6590/crates/uv-resolver/src/pubgrub/report.rs#L33). Upstreamed from https://github.com/astral-sh/pubgrub/pull/19.

This resolves a large chunk of our diff with upstream (dev to uv main is 1278 lines, this PR to uv main is 743, measured as git diff <branch>..konsti/main-rebase-generic-reason | wc -l.

mpizenberg commented 1 month ago

Thanks for backporting that work from uv!