Improve depext unavailable messages from the solver #4678
Merged
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.
Well, hopefully improve. At the moment, if you install a conf package directly, you get the depext availability message from before solving:
although the message is not properly formatted. If, as is more likely, the conf package is pulled in via a dependency, the message comes after solving and is a little more intimidating:
(and also features the same formatting problem).
This PR fixes the formatting of multiple missing depexts, so you now get:
and also spots that all the chains refer to the same missing dependency and reduces that to one explanation. It doesn't display any chain with that, because I don't think it's useful - all possible solutions required this depext, so the package name should be obvious to the user. Conversely, picking the right chain to display is extremely tricky, if even possible. You now get the slightly less scary-looking:
The reduction should be extended to group the explanations first, but I wanted to get some feedback on the refactoring before doing that too.