Skip to content

Commit f199db0

Browse files
committed
Try harder to find the true path of a method
Particularly on Julia binaries, the path may need correction. Tests are in Revise.
1 parent 2880ce0 commit f199db0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/CodeTracking.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ is the first line of the method's body.
3030
"""
3131
function whereis(method::Method)
3232
lin = get(method_info, method.sig, nothing)
33+
if lin === nothing
34+
f = method_lookup_callback[]
35+
if f !== nothing
36+
Base.invokelatest(f, method)
37+
end
38+
lin = get(method_info, method.sig, nothing)
39+
end
3340
if lin === nothing
3441
file, line = String(method.file), method.line
3542
else

0 commit comments

Comments
 (0)