You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the module case, I tried the naive fix of modifying methods_by_execution as follows:
elseif skip_include && (f === modinclude || f === Base.include || f === Core.include)
# include calls need to be managed carefully from several standpoints, including# path management and parsing new expressions
mod_or_path =@lookup(frame, stmt.args[2])
ifisa(mod_or_path, Module) # include(mod, pathname)add_includes!(methodinfo, mod_or_path, @lookup(frame, stmt.args[3]))
elseadd_includes!(methodinfo, mod, mod_or_path)
endassign_this!(frame, nothing) #FIXME: the file might return something different from `nothing`
pc =next_or_nothing!(frame)
This passes Revise tests but doesn't seem to correctly give Revise access to the names from the include, as we hit a UndefVarError in the EscapeAnalysis example above. Will update if I can fix later today!
The text was updated successfully, but these errors were encountered:
ianatol
changed the title
Revise gives MethodError on 2-argument includes
Revise gives MethodError on "module" 2-argument includes
Feb 9, 2022
Bumping, and on second thought I think my solution might work. There were other problems in the EA case that led to the UndefVarError, so this naive approach might actually be correct..
If you can't get around to it, I'll try and figure out how to write a test and open a PR based on this solution tomorrow.
The
include(mapexpr, path)
case is discussed at #634, but similarly, Revise can't handleinclude(m::Module, path)
either.See JuliaLang/julia#43800 (comment) for an example.
For the module case, I tried the naive fix of modifying
methods_by_execution
as follows:This passes Revise tests but doesn't seem to correctly give Revise access to the names from the
include
, as we hit aUndefVarError
in the EscapeAnalysis example above. Will update if I can fix later today!The text was updated successfully, but these errors were encountered: