Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve dependency conflict error messages #4094

Conversation

dinkelspiel
Copy link
Contributor

Improved the error message for dependency resolution failures to more clearly
explain why the conflict occurs. Previously, the error message only listed the
names of the conflicting packages:

- mist
- server
- cors_builder

Now, the message provides more detailed descriptions:

- Package `app` requires `cors_builder` 1.0.0 <= v < 2.0.0
- Conflict with the `mist` package:
    - `cors_builder` requires `mist` version 1.0.0 <= v < 2.0.0
    - `app` requires `mist` version 3.0.0 <= v < 4.0.0

@giacomocavalieri
Copy link
Member

giacomocavalieri commented Dec 18, 2024

Hello! This is being worked in #3640
Unfortunately it's blocked by an external issue with a dependency that doesn't allow us to display the version constraint nicely: pubgrub-rs/pubgrub#258 (comment)

The default to_string implementation was deemed confusing and that's why it was removed from the error message; so there's not much we can do until the pubgrub package resolves this

@dinkelspiel
Copy link
Contributor Author

Of course i'm biased, but i'd still argue that it's good to merge this in the meantime. I had this issue today and it tells you next to nothing, I think it's better to merge this so it's there and gives information rather than having to wait for an external dependency to merge something so we can mitigate some poor soul having to search through each dependencies gleam.toml to find the issue.

@giacomocavalieri
Copy link
Member

I agree with you, but I've already had this talk with Louis and he won't merge this; otherwise #3640 would have been merged already. There's nothing much we can do besides waiting 😅

@lpil
Copy link
Member

lpil commented Dec 18, 2024

Please open or participate in an issue before implementing any changes. It is unlikely that any unplanned work will be accepted as the odds of it having the intended design is very low and it's not fun to have your work rejected after you spent the time on it. Thank you

@lpil lpil closed this Dec 18, 2024
@dinkelspiel dinkelspiel deleted the improve-dependency-conflict-error branch December 18, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants