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

unpack screws up subsequent backtraces #92

Closed
marius311 opened this issue Dec 6, 2018 · 3 comments
Closed

unpack screws up subsequent backtraces #92

marius311 opened this issue Dec 6, 2018 · 3 comments

Comments

@marius311
Copy link

@unpack seems to do something weird to backtraces for errors which appear after it. For example, why does Parameters.jl appear in the following backtrace at all?

julia> using Parameters

julia> function foo(nt)
           @unpack x,y = nt
           error("message")
       end
foo (generic function with 1 method)

julia> foo((x=1,y=2))
ERROR: message
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at /home/marius/.julia/packages/Parameters/rOe8Q/src/Parameters.jl:734 [inlined]
 [3] foo(::NamedTuple{(:x, :y),Tuple{Int64,Int64}}) at ./REPL[2]:2
 [4] top-level scope at none:0

I get other screwy behavior in my real code, but I figure this simple example can probably help track down the problem. I'm on Julia 1.0.2 and Parameters v0.10.2.

@mauro3
Copy link
Owner

mauro3 commented Dec 6, 2018

Thanks. Of note: this does not happen in Julia-0.6.

@ChrisRackauckas
Copy link
Collaborator

ChrisRackauckas commented Dec 6, 2018

It's a v1.0 thing: JuliaLang/julia#28618 . Should be fixed in v1.1

@mauro3
Copy link
Owner

mauro3 commented Dec 6, 2018

Yes, that's it, it works fine on Julia-master. Thanks Chris!

@mauro3 mauro3 closed this as completed Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants