I just noticed this, in one of my apps. Wondering what happens if I have two apps with the same module name, running at the same time?
[ Info: Recompiling stale cache file /Users/adrian/.julia/compiled/v1.0/BooksController.ji for BooksController [top-level]
Yes, it seems that modules loaded in Main
(top level) with the same name overwrite their caches.
And at some point, this happens:
julia> ZeModule.foo()
ERROR: /Users/adrian/appz/1/ZeModule.jl is not stored in the source-text cache
Stacktrace:
[1] error(::String, ::String) at ./error.jl:42
[2] _read_dependency_src(::IOStream, ::String) at ./loading.jl:1305
[3] read_dependency_src(::IOStream, ::String) at ./loading.jl:1291
[4] read_dependency_src(::String, ::String) at ./loading.jl:1312
[5] read_from_cache(::Revise.FileInfo, ::String) at /Users/adrian/.julia/packages/Revise/xO23U/src/pkgs.jl:156
[6] maybe_parse_from_cache!(::Revise.FileInfo, ::String) at /Users/adrian/.julia/packages/Revise/xO23U/src/pkgs.jl:162
[7] revise_file_now(::String) at /Users/adrian/.julia/packages/Revise/xO23U/src/Revise.jl:413
[8] revise(::REPL.REPLBackend) at /Users/adrian/.julia/packages/Revise/xO23U/src/Revise.jl:470
[9] run_backend(::REPL.REPLBackend) at /Users/adrian/.julia/packages/Revise/xO23U/src/Revise.jl:764
[10] (::getfield(Revise, Symbol("##58#60")){REPL.REPLBackend})() at ./task.jl:259