Open nickrobinson251 opened 5 years ago
Sometimes it is useful to create a new environment stacked on the current environment
When is this? Something solved by https://github.com/JuliaLang/Pkg.jl/issues/1233?
One example is developing tests for a package: instantiate
a Project, add
some test-only dependencies while working, they get added to deps
, but you do not want them in deps. (Even if these test-only dependencies already exist in extras
, they will be ignored by instantiated
, and you need to add
them and they get added to deps
.)
Similar thing goes for developing a new feature, where you're experimenting with some new dependencies.
Seems like an example of a "sub-project", but #1233 is maybe trying to solve some more complicated cases than this too :)
One example is developing tests for a package: instantiate a Project, add some test-only dependencies while working, they get added to deps, but you do not want them in deps. (Even if these test-only dependencies already exist in extras, they will be ignored by instantiated, and you need to add them and they get added to deps.)
This is basically #1233, and is essentially already working in Julia 1.2.
Similar thing goes for developing a new feature, where you're experimenting with some new dependencies.
Isn't this why we use git?
I think this could be solved without solving #1233 :)
(But hopefully solving #1233 hopefully solves this -- i feel like that's a good, more ambitious goal, and here i'm suggesting a nicer interface for a thing i thought was already possible i.e. stacking environments... maybe i'm wrong).
is essentially already working in Julia 1.2
i've not used Julia 1.2 yet, and do not know what's different, sorry. Are you saying #1233 is resolved in 1.2?
Isn't this why we use git?
Git can help me fix the unintended changes.
Access to different dependencies is why we use a package manager. I would like to have fixed list of "level1" packages that are accessible from a "level2" environment. This is already possible when "level1" is "v1.x", but not otherwise.
Sometimes it is useful to create a new environment stacked on the current environment (where the current environment is not the "base"
v1.x
environment)e.g. Have both "Level1" and "Level2" packages available by doing something like this
^ This doesn't stack Level2 on Level1
The workaround is to
pushfirst!(LOAD_PATH, "path/to/Level1")
(Thanks @fredrikekre for pointing this out).e.g.
Perhaps this can be an argument to
activate
? e.g.activate --stack Level2
, to first add the current environment to theLOAD_PATH
before activating the new one?(I think this has some relation to #1233 ...and maybe #621)