I know this question has been asked and answered before, but none of the many answers work for me as described.
What is the procedure for reloading a module that I'm working on in Julia (1.6)?
For example, I have
module MyModule
export letters
const letters = String('A':'Z')
end
and I want the be able to load the module, make changes to letters
in the module's file, and then reload the module and have those changes reflected in subsequent uses of letters
. This seems simple enough, but I can't get it to work.
I've tried
include("src/MyModule.jl")
using .MyModule
but if I change the definition of letters
in MyModule.jl
and then
include("src/MyModule.jl")
letters
doesn't change, unless I fully qualify its use each time with Main.MyModule.letters
: using Main.MyModule; letters
refers, for example, to the old definition.
How do I reload a module under development so that I can refer to its definitions without fully qualifying them (and without having an unqualified shadow definition always lying around)?