I was wondering how the environments in Julia work. I thought that by creating a new environment you should be able to see only the packages that are in that environment, but that doesn't seem to be the case. Why is that so?
I.e. if I create a temporary directory and start Julia with that directory as an environment, I still can load modules that are in my general environment, but not in the standard library.
$ mkdir /tmp/jl_temp
$ julia --project=/tmp/jl_temp
(jl_temp) pkg> st
Status `/tmp/jl_temp/Project.toml` (empty project)
julia> using Plots
julia> plot()
This works without giving me any package not installed error. Can someone explain me the reason of this behavior? To me it should not be able to load any package except for the standard library and the packages inside the Project.toml
file of the environment. I could not find any answer in the Documentation of Pkg.jl.