-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Long types printed in MethodError #50803
Comments
Thanks for the issue and the MWE 🚀 |
One big concern: when printing a stacktrace, we can fall back on
for those cases where full type-information is needed to resolve the error. But when the MethodError happens at toplevel (directly in the REPL call itself), there is no julia> foo(a, a, a, a, a, a, a)
ERROR: MethodError: no method matching foo... # manually truncated
Stacktrace:
[1] top-level scope
@ REPL[3]:1
julia> err
julia> |
Newbie reac here: can we put the error in |
I think we should be able to put it in err, but I'm not immediately sure why we don't have it. Will do a bit of digging. |
The answer seems to be Lines 105 to 106 in 117ef2e
If I change that to always return |
The intent there was just to avoid saving a stack trace that was just the top level, partly to avoid overwriting the variable if you make an error trying to access it. So I don't see any harm in deeming all MethodErrors to be not trivial. |
This applies the same `...` depth-based parametric truncation to the signature in `MethodError` that we use in printing stacktraces. Fixes #50803
As reported in https://discourse.julialang.org/t/type-parameter-display-in-1-10-for-methoderror/102516
The text was updated successfully, but these errors were encountered: