This seems like an obvious question, but I can't find the answer anywhere. I want to have all of my environments to have Revise
installed, but I don't want to have to do that manually because Revise
isn't relevant to the specific project - for instance I want to have Revise
installed in every environment in every examples
folder in every package I write without specifying it. Is there any way of automatically including some environment (i.e. some global Project.toml
/ Manifest.toml
) in any current environment? Or maybe a way of nesting one environment inside another?
These are rather called "stacked" environments.
See https://discourse.julialang.org/t/why-not-always-use-revise/64589/6
It should be sufficient to add Revise to the default environment to make it available while activating project and package environments.
Thanks. I honestly had no idea that worked after god knows how long using Julia now. I can't help but feel it should be better documented! Presumably it means that I don't know without putting stuff in CI on github whether I've actually put the right dependencies into a new environment though if Julia automatically pulls things that I have in my global environment into any local environment? Is there anyway of switching it off?
JULIA_LOAD_PATH="@" julia --project -e 'import Pkg; Pkg.test()'
Thanks!
Richard Reeve has marked this topic as resolved.
Just tested it, on my computer when I run pkg> test
, it does not use packages from the default environment (thank God!)
Last updated: Nov 06 2024 at 04:40 UTC