-
-
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
kwcall appearing in stacktraces #47319
Labels
error messages
Better, more actionable error messages
regression
Regression in behavior compared to a previous version
Milestone
Comments
vtjnash
added
regression
Regression in behavior compared to a previous version
display and printing
Aesthetics and correctness of printed representations of objects.
error messages
Better, more actionable error messages
and removed
display and printing
Aesthetics and correctness of printed representations of objects.
labels
Oct 25, 2022
https://buildkite.com/julialang/julia-master/builds/17475#0184118b-9227-4abd-b2c8-132b19d74672 I saw it here on both macos tests. Seems worrying |
That doesn't seem to have anything to do with this. Did you mean to make a new issue? |
Oh, it was just another case kwcall in stacktraces. |
vtjnash
added a commit
that referenced
this issue
Oct 28, 2022
They are not strictly internal, but also not strictly external, so just assume they should be hidden. Perhaps, in the future, we should figure out a way to signal directly in the line number value that this line can be hidden, so only exactly the inner call gets hidden, but not errors that happen in the kwsorter itself (for example, for computing default values). Then all of these could print comparable backtraces (rather than just hiding the kwcall, as this PR does): ``` julia> f(; a, b) = error() f (generic function with 1 method) julia> f() ERROR: UndefKeywordError: keyword argument `a` not assigned Stacktrace: [1] f() @ Main ./REPL[1]:1 [2] top-level scope @ REPL[2]:1 julia> f(b=1) ERROR: UndefKeywordError: keyword argument `a` not assigned Stacktrace: [1] kwcall(::NamedTuple{(:b,), Tuple{Int64}}, ::typeof(f)) @ Main ./REPL[1]:1 [2] top-level scope @ REPL[3]:1 julia> f(a=1) ERROR: UndefKeywordError: keyword argument `b` not assigned Stacktrace: [1] kwcall(::NamedTuple{(:a,), Tuple{Int64}}, ::typeof(f)) @ Main ./REPL[1]:1 [2] top-level scope @ REPL[4]:1 julia> f(a=1, b=2) ERROR: Stacktrace: [1] error() @ Base ./error.jl:44 [2] f(; a::Int64, b::Int64) @ Main ./REPL[1]:1 [3] kwcall(::NamedTuple{(:a, :b), Tuple{Int64, Int64}}, ::typeof(f)) @ Main ./REPL[1]:1 [4] top-level scope @ REPL[5]:1 ``` Fix #47319
vtjnash
added a commit
that referenced
this issue
Nov 1, 2022
They are not strictly internal, but also not strictly external, so just assume they should be hidden. Perhaps, in the future, we should figure out a way to signal directly in the line number value that this line can be hidden, so only exactly the inner call gets hidden, but not errors that happen in the kwsorter itself (for example, for computing default values). Then all of these could print comparable backtraces (rather than just hiding the kwcall, as this PR does): ``` julia> f(; a, b) = error() f (generic function with 1 method) julia> f() ERROR: UndefKeywordError: keyword argument `a` not assigned Stacktrace: [1] f() @ Main ./REPL[1]:1 [2] top-level scope @ REPL[2]:1 julia> f(b=1) ERROR: UndefKeywordError: keyword argument `a` not assigned Stacktrace: [1] kwcall(::NamedTuple{(:b,), Tuple{Int64}}, ::typeof(f)) @ Main ./REPL[1]:1 [2] top-level scope @ REPL[3]:1 julia> f(a=1) ERROR: UndefKeywordError: keyword argument `b` not assigned Stacktrace: [1] kwcall(::NamedTuple{(:a,), Tuple{Int64}}, ::typeof(f)) @ Main ./REPL[1]:1 [2] top-level scope @ REPL[4]:1 julia> f(a=1, b=2) ERROR: Stacktrace: [1] error() @ Base ./error.jl:44 [2] f(; a::Int64, b::Int64) @ Main ./REPL[1]:1 [3] kwcall(::NamedTuple{(:a, :b), Tuple{Int64, Int64}}, ::typeof(f)) @ Main ./REPL[1]:1 [4] top-level scope @ REPL[5]:1 ``` Fix #47319
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
regression
Regression in behavior compared to a previous version
I have been seeing kwcall in stacktraces, and need to figure out how to reproduce it. It seems my mistake is here:
Originally posted by @vtjnash in #47157 (comment)
The text was updated successfully, but these errors were encountered: