diff --git a/etc/scripts/julia_wrapper.jl b/etc/scripts/julia_wrapper.jl index cf8f5fce9..3193bb553 100644 --- a/etc/scripts/julia_wrapper.jl +++ b/etc/scripts/julia_wrapper.jl @@ -69,8 +69,9 @@ function main() # Find functions and method specializations m_methods = Any[] - for name in names(m, all=true, imported=true) - local fun = getfield(m, name) + # `Base.invokelatest` is needed for . + for name in Base.invokelatest(names, m; all=true, imported=true) + local fun = Base.invokelatest(getfield, m, name) if fun isa Function if verbose println("Function: ", fun) @@ -137,7 +138,7 @@ function main() InteractiveUtils.code_native(io, me_fun, me_types; debuginfo) end elseif format == "warntype" - InteractiveUtils.code_warntype(io, me_fun, me_types; debuginfo) + Base.invokelatest(InteractiveUtils.code_warntype, io, me_fun, me_types; debuginfo) end # Add extra newline, because some of the above tools don't add a final newline, # and when we have multiple functions to be shown, they'd be mixed up.