-
-
Notifications
You must be signed in to change notification settings - Fork 888
Emphasize mismatching part of complex type mismatches #5062
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
base: main
Are you sure you want to change the base?
Conversation
abs0luty
commented
Oct 20, 2025
- Closes Emphasize mismatching part of complex type mismatches #4578
d3d31b2 to
6167eb0
Compare
6167eb0 to
4b683c2
Compare
| // If we get here, we have exactly 1 mismatch at depth 1 | ||
| // This is like List(Int) vs List(String) - simple enough to not need smart diff | ||
| false | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpil what's your opinion on when to display errors this way?
|
That looks like a bug in Zed to me @giacomocavalieri. We tell it to render it as markdown. |
|
Yeah, the wrapping can still make it hard to read though |
|
@giacomocavalieri Good point about wrapping. Thanks! I think we can solve it in many different ways: We can break the mismatch into bullet points under the main message. Something like "Mismatch at argument 2: expected Float, found String" without trying to align under the original text, or something like this: Or even separate error messages: We can also control the block width manually (e.g., add zero-width spaces or break into smaller lines ourselves), although there's always a limit to this: What do you think? |

