Skip to content
Merged
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
16 changes: 12 additions & 4 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ function delete_missing!(exs_sigs_old::ExprsSigs, exs_sigs_new)
# ex was deleted
sigs === nothing && continue
for sig in sigs
ret = Base._methods_by_ftype(sig, -1, typemax(UInt))
@static if VERSION ≥ v"1.10.0-DEV.873"
ret = Base._methods_by_ftype(sig, -1, Base.get_world_counter())
else
ret = Base._methods_by_ftype(sig, -1, typemax(UInt))
end
success = false
if !isempty(ret)
m = get_method_from_match(ret[end]) # the last method returned is the least-specific that matches, and thus most likely to be type-equal
Expand Down Expand Up @@ -1238,15 +1242,19 @@ Revise itself does not need to be running on `p`.
"""
function init_worker(p)
remotecall(Core.eval, p, Main, quote
function whichtt(sig)
ret = Base._methods_by_ftype(sig, -1, typemax(UInt))
function whichtt(@nospecialize sig)
@static if VERSION ≥ v"1.10.0-DEV.873"
ret = Base._methods_by_ftype(sig, -1, Base.get_world_counter())
else
ret = Base._methods_by_ftype(sig, -1, typemax(UInt))
end
isempty(ret) && return nothing
m = ret[end][3]::Method # the last method returned is the least-specific that matches, and thus most likely to be type-equal
methsig = m.sig
(sig <: methsig && methsig <: sig) || return nothing
return m
end
function delete_method_by_sig(sig)
function delete_method_by_sig(@nospecialize sig)
m = whichtt(sig)
isa(m, Method) && Base.delete_method(m)
end
Expand Down