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

kwargs printing is not quite accurate in stacktraces #37936

Open
vtjnash opened this issue Oct 8, 2020 · 1 comment
Open

kwargs printing is not quite accurate in stacktraces #37936

vtjnash opened this issue Oct 8, 2020 · 1 comment
Assignees
Labels
domain:display and printing Aesthetics and correctness of printed representations of objects.

Comments

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 8, 2020

I thought we perhaps used to print kwargs..., but right now we seem to print something quite awkwardly overcomplicated:

remotecall_fetch(::Function, ::Distributed.Worker, ::Distributed.RRID, ::Vararg{Any, N} where N;
    kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})

vs.

julia> methods(Distributed.remotecall_fetch)
...
remotecall_fetch(f, w::Distributed.Worker, args...; kwargs...) in Distributed at /data/vtjnash/julia/usr/share/julia/stdlib/v1.6/Distributed/src/remotecall.jl:383
...
@JeffBezanson JeffBezanson added kind:bug Indicates an unexpected problem or unintended behavior domain:display and printing Aesthetics and correctness of printed representations of objects. labels Oct 8, 2020
@JeffBezanson JeffBezanson self-assigned this Oct 8, 2020
@JeffBezanson JeffBezanson removed the kind:bug Indicates an unexpected problem or unintended behavior label Oct 8, 2020
@JeffBezanson
Copy link
Sponsor Member

I think the reason this happens is that it's printing the types of actual arguments available within the method. In this case there is indeed a kwargs argument of type Base.Iterators.Pairs, so it's not wrong. In contrast, the output of methods() is showing the declared signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

No branches or pull requests

2 participants