Allow seeing reason of version resolution failure #3635
Replies: 3 comments 9 replies
-
When you say "see the reason" what do you mean? What would it look like? |
Beta Was this translation helpful? Give feedback.
-
I would prefer being able to see this, even if it's difficult to read:
Sure it's verbose and not nice to look at, but in the end when you read it carefully, you can get to the bottom of the problem faster than going through Hex, looking at the dependencies for all the packages, and trying to do the math yourself. I can appreciate not showing this to a user as the first possible error, but as an advanced user I would like the option to see it. |
Beta Was this translation helpful? Give feedback.
-
A little update after asking for feedback on Discord as well! A nice looking output that I'm working on could look something like this: error: Dependency resolution failed
An error occurred while determining what dependency packages and
versions should be downloaded.
The error from the version resolver library was:
- your package requires `two` to be `1.0.0`
- it also requires `wisp` to be `1.1.0`
- and `wisp` requires `gleam_json` to be `>= 0.6.0 and < 2.0.0`
- `two` requires `three` to be `1.0.0`
- and `three` requires `gleam_json` to be `>= 2.0.0 and < 3.0.0`
That means there's no version of `gleam_json` compatible with
both `wisp` and `three` together. The last sentence was proposed by Hayleigh with the following reasoning:
And I agree that it would be better if after laying out all the facts the tool could help you reach the conclusion that there's no |
Beta Was this translation helpful? Give feedback.
-
In #3002 the reason for version resolution failures was changed to a more simplified version. Example:
When you have many packages that have many of their own dependencies, finding out the reason for the failure is not trivial even if it tells you which packages are involved. It would be useful to have a flag
--detailed-errors
or something like that to allow seeing the admittedly complicated error message that originally existed. I feel that it would be better than nothing. Currently I'm going through Hex.pm, trying to deduce the dependency ranges in my head, but it's difficult as I don't even know which dependency the failure is about.Beta Was this translation helpful? Give feedback.
All reactions