This short thread addresses this, this is how includet is supposed to work: “include and track this file”. To automatically track a network of included files, you need to work on a package. I think you could technically replace nested includes with includet but you’d also have to temporarily import Revise in all your modules, and that’s not recommended over package work.
An aside, the other issue that thread addresses appears to have been patched by now.
I am a bit lost with packages… The docs are either too trivial or too difficult for me xD
Here is a test:
I create a package named “REVISETEST”, whose /src folder holds two files: REVISETEST.jl
module REVISETEST
include("revise_include.jl")
end # module REVISETEST
and revise_include.jl
function this_is_sparta()
print("This is SPARTA!!!!")
end
After Pkg.activate("REVISETEST"), I open some main file:
using REVISETEST
REVISETEST.this_is_sparta()
Note that I don’t even use Revise here. Yet, if I comment out the Sparta function in revise_include and save the file, and then re-run the main file (without restarting Julia), the function is gone. Are packages automatically “revised”, or what is going on here?
After editing a file in its package, rerunning using REVISETEST actually reevaluates and reimports it. Revise is designed to automatically make some small changes to live code when you edit the tracked source code, no need to do the big overhauls (rerunning include, using, import) and waste time reevaluating lines you didn’t change. You will have to do the big overhauls once in a while because small interactive changes out of order does not always have the same effect, but you can get a lot done with small changes.
What seems to work? The whole process you described above? Did you make sure to go through the process twice, once to make this_is_sparta exist in the session and once after commenting it out in the source? I don’t use VScode so I can’t really answer this, I’m just curious because it’s unexpected.