Closed konstin closed 1 month ago
Sorry for the delay. I just had a chance to look at the diff, and I absolutely love it. Thank you so much! I need to poke at this in an editor before I write up the few nits I have.
Should we create a trait for M: Eq + Clone + Debug + Display
?
Yes. I think we should have a trait. Although it could be in a follow-up PR. It should, one day, have a method can_merge(&Self, &Self) -> Option<Self>
instead of the Eq
bound. None
would mark that the two incompatibilities should not be merged. And Some(M)
would provide the new metadata for the merged incompatibility. That would allow a error like "unavailable because of HTTP 404, with request ID 123456789" to be merged with "unavailable because of HTTP 404, with request ID 987654321" even though they are not structurally equal.
Restructure the incompatibility into pubgrub internal metadata and a custom external type.
The internal types are:
M
to a custom enum of theirs. Examples:I'm currently working on adapting the formatting to adapt to the uv of this. This should reduce our diff significantly.
This refactoring is relevant to collapsing custom incompatibilities, but i haven't looked into this properly yet.