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

Adjust to https://github.com/JuliaLang/julia/pull/56878 #873

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,13 @@
t, nrep = t
end
t = t::StackTraces.StackFrame
if t.linfo isa Core.MethodInstance
m = t.linfo.def
linfo = t.linfo
if linfo isa Core.CodeInstance
linfo = linfo.def
(isdefined(Core, :ABIOverride) && isa(linfo, Core.ABIOverride)) && (linfo = linfo.def)

Check warning on line 1213 in src/packagedef.jl

View check run for this annotation

Codecov / codecov/patch

src/packagedef.jl#L1212-L1213

Added lines #L1212 - L1213 were not covered by tests
end
if linfo isa Core.MethodInstance
m = linfo.def
sigt = m.sig
# Why not just call `whereis`? Because that forces tracking. This is being
# clever by recognizing that these entries exist only if there have been updates.
Expand Down
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,8 @@ end
@test isequal(ex, Revise.RelocatableExpr(:(f(v::AbstractVector{<:Integer}) = 3)))

st = try GetDef.bar(5.0) catch err stacktrace(catch_backtrace()) end
m = st[2].linfo.def
linfo = st[2].linfo
m = isa(linfo, Core.CodeInstance) ? linfo.def.def : linfo.def
def = Revise.RelocatableExpr(definition(m))
@test def == Revise.RelocatableExpr(:(foo(x::T, y::Integer=1; kw1="hello", kwargs...) where T<:Number = error("stop")))

Expand Down
Loading