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

show function arguments in different colors in method errors #50884

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rafaqz
Copy link
Contributor

@rafaqz rafaqz commented Aug 11, 2023

I have always struggled to read method errors. Past a degree of type complexity it becomes very hard to see where one argument stops and the next starts.

This PR gives each argument an alternating color, making it trivial to distinguish them.

We may want better colors than green and black, if anyone has opinions.

@timholy
Copy link
Member

timholy commented Aug 11, 2023

Will #50809 make it easier to read?

@rafaqz
Copy link
Contributor Author

rafaqz commented Aug 11, 2023

Oh good timing, yes that's another way to do it. Maybe we could still alternate colors in the full show(err)

@brenhinkeller brenhinkeller added the error messages Better, more actionable error messages label Aug 11, 2023
@JeffBezanson
Copy link
Member

We shouldn't use black, since many people use dark terminal backgrounds and it's very hard to see.

@rafaqz
Copy link
Contributor Author

rafaqz commented Aug 12, 2023

Yes I guess :default is better, and blue seems more subtle in most themes.

So maybe :default and :blue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Better, more actionable error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants