-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add more context to error messages #16
Comments
I’m struggling to find a nice way to present all the information. When we have a type failure, we’ll have three things:
|
Just wanted to say that (2) would be a great addition. Given that our codebase is made up of almost entirely Presentation-wise, I think RSpec output does a decent job of presenting an expected vs actual value, and I see this as somewhat analogous. Looking forward to |
We’re really close now. |
Maybe:
Here's Sorbet's type error: https://sorbet.org/docs/error-reference#7002 Edit: |
Made some progress on this in #98, but we can go further. Specifically, I would like to make collection types recursively add further context, so you know which specific key a check failed on. |
hey @joeldrapper. Is there anything I can do to help? Otherwise, do you know if that's the last thing that will change until literal 1.0? In other words is it valid to use main right now? |
I don’t expect to ship any significant changes to main. I think this is the last bit. |
ok thank you! Is there anything I can do to help with this issue btw? |
We can usually add some additional context such as the name of the attribute. Additionally, collection types could implement an alternative interface that allows them to highlight specifically which member failed and why.
The text was updated successfully, but these errors were encountered: