Hi, I have a simple question about nested include when using Revise.jl. Consider the following nested structure:
module1.jl:
module Module1
function f1()
println("abc")
end
include("module2.jl")
end
And then module2.jl:
function f2()
println("123")
end
When I do
julia> using Revise
julia> includet("module1.jl")
julia> using .Module1
I can update the function f1 by modifying module1.jl, but I cannot modify f2 via modifying module2.jl. As I understand it, it is because Revise.jl does not “penetrate” the include statement in module1.jl.
Is there an easy way around this? I suppose I can change include to includet, but that would add Revise as a dependency to Module1, when it’s otherwise unnecessary, which I would like to avoid.
Note that it’s not even necessary to make your module into a package, it’s enough to have it in a file with the module’s name ("Module1.jl"), and have your file in your LOAD_PATH.