-
Notifications
You must be signed in to change notification settings - Fork 34
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
less helpful stacktraces on 1.6 #185
Comments
Hmm, interesting... I have made a more minimal reproducer: julia> foo() = error()
foo (generic function with 1 method)
julia> @generated function bar()
ci = copy(code_lowered(foo, Tuple{})[])
ci.linetable[1] = Core.LineInfoNode(:baz, :f, 1, 0)
ci.inlineable = true
return ci
end
bar (generic function with 1 method)
julia> foo2() = bar()
foo2 (generic function with 1 method)
julia> @generated function bar2()
ci = copy(code_lowered(foo2, Tuple{})[])
ci.linetable[1] = Core.LineInfoNode(:baz2, :f, 1, 0)
return ci
end
bar2 (generic function with 1 method)
julia> bar2()
ERROR:
Stacktrace:
[1] error() at ./error.jl:42
[2] baz2 at ./f:1 [inlined]
[3] bar2() at ./REPL[4]:0
[4] top-level scope at REPL[5]:1 Latest master: julia> foo() = error()
foo (generic function with 1 method)
julia> @generated function bar()
ci = copy(code_lowered(foo, Tuple{})[])
ci.linetable[1] = Core.LineInfoNode(Main, :baz, :f, 1, 0)
ci.inlineable = true
return ci
end
bar (generic function with 1 method)
julia> foo2() = bar()
foo2 (generic function with 1 method)
julia> @generated function bar2()
ci = copy(code_lowered(foo2, Tuple{})[])
ci.linetable[1] = Core.LineInfoNode(Main, :baz2, :f, 1, 0)
return ci
end
bar2 (generic function with 1 method)
julia> bar2()
ERROR:
Stacktrace:
[1] error()
@ Base ./error.jl:42
[2] bar2
@ ./f:1 [inlined]
[3] bar2()
@ Main ./REPL[19]:0
[4] top-level scope
@ REPL[20]:1 I am increasingly thinking that this might not be fixable in Cassette alone, since I think the way this now works, for function names in stacktraces we now always take the LineInfoNode from the initial lowering of the generated function itself, not the output of the |
@JeffBezanson @vtjnash any ideas if we can fix this on the Cassette side? |
(Note that the 1.5 behavior also seems kind of broken, since I would have expected the second entry to show up as |
This fools Julia into thinking we inlined an additional function here, so we get better stacktraces. fixes JuliaLabs#185
* better stacktraces in overdubs This fools Julia into thinking we inlined an additional function here, so we get better stacktraces. fixes #185
As reported in JuliaLang/julia#37954 (comment), #37954 seems to have regressed stacktraces of inlined overdubs, so they show up as
overdub
instead of as the overdubbed function itself. From the discussion with @vchuravy on Slack:The text was updated successfully, but these errors were encountered: