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

Slightly less bad error messages for promote_shape #33567

Merged
merged 1 commit into from
Oct 16, 2019
Merged

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Oct 15, 2019

Having been enraged by these existing cryptic error messages, I tried to give the user a bit more information about what went wrong. Happy to take suggestions on further improvements.

@kshyatt kshyatt added domain:arrays [a, r, r, a, y, s] domain:error messages Better, more actionable error messages labels Oct 15, 2019
@fredrikekre
Copy link
Member

Fixes #33273 ?

@JeffBezanson
Copy link
Sponsor Member

👍
Something about DimensionMismatch("dimensions must match") certainly smells wrong. How about adding two fields to DimensionMismatch for the things that don't match?

@kshyatt
Copy link
Contributor Author

kshyatt commented Oct 15, 2019

Is that what we want to do? You can have three things which have a dimensionality issue, and this occurs in the LinearAlgebra stdlib. (Here, for example).

@JeffBezanson
Copy link
Sponsor Member

I guess it could be a tuple of N things. It can also be optional; we can still allow just passing a string. We do want to move away from interpolating in error messages though, since it is generally hard on the compiler (it makes many functions recursive, via a circuitous route through all of the I/O and printing code), makes it harder to compile things to e.g. GPUs, and it would often be better to separate the information from the presentation.

@kshyatt
Copy link
Contributor Author

kshyatt commented Oct 15, 2019

Yeah, that sounds reasonable. But IDK if I want to tackle rewriting DimensionMismatch entirely in this pr :).

@kshyatt
Copy link
Contributor Author

kshyatt commented Oct 15, 2019

BSD failure was in LibGit2.

@kshyatt
Copy link
Contributor Author

kshyatt commented Oct 16, 2019

Got the go-ahead from Jeff to merge this.

@kshyatt kshyatt merged commit 49603e1 into master Oct 16, 2019
@kshyatt kshyatt deleted the ksh/promoteshape branch October 16, 2019 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:arrays [a, r, r, a, y, s] domain:error messages Better, more actionable error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants