I have a question regarding ITensors.jl in development mode. I have ITensors in the .julia/dev folder, since I am trying to made modifications to the ITensors.jl code itself for my applications.
I have noticed that, if I modify an existing method in a file in ITensors (for instance, adding a print statement to one of the dmrg functions in src/mps/dmrg.jl), I can see that change reflected immediately in any code I run that calls that function. However, if I create a new method in one of the existing files, then this change fails. Just as an example, I did this with a very simple addition to src/mps/dmrg.jl:
function test_function()
println("You made it!")
return 0
end
I then made another file with just two lines of code:
using ITensors
my_var = test_function()
And here is the output I got when running this file:
ERROR: LoadError: UndefVarError: test_function not defined
Stacktrace:
[1] top-level scope at d:\Sujay Google Drive\Julia
Files\J1_J2_model_custom_periodic_dmrg.jl:32
[2] include(::String) at .\client.jl:439
[3] startdebug(::Base.PipeEndpoint, ::VSCodeDebugger.var"#3#4"{Tuple{String,String}})
at c:\Users\user\.vscode\extensions\julialang.language-julia-
0.17.7\scripts\packages\DebugAdapter\src\packagedef.jl:89
[4] startdebugger() at c:\Users\user\.vscode\extensions\julialang.language-julia-
0.17.7\scripts\packages\VSCodeDebugger\src\VSCodeDebugger.jl:38
[5] top-level scope at c:\Users\user\.vscode\extensions\julialang.language-julia-
0.17.7\scripts\debugger\run_debugger.jl:7
[6] include(::Module, ::String) at .\Base.jl:377
[7] exec_options(::Base.JLOptions) at .\client.jl:288
[8] _start() at .\client.jl:484
in expression starting at d:\Sujay Google Drive\Julia
Files\J1_J2_model_custom_periodic_dmrg.jl:32
Why is this? Is there something different about creating a new function, as opposed to modifying an existing one, that leads to the former change not being incorporated into some other piece of code that uses that function? I can post