Is it possible - and if yes, how - to stack multiple environments for a reproducibility repository? That is, I would like to have two sets of Project.toml/Manifest.toml files living outside the DEPOT_PATH where I am able to independently (and in a reproducible manner!) control the package versions used.
Here is my use case (hopefully this makes it clearer):
To a reproducibility repository, I have added an environment A with a Project.toml/Manifest.toml pair that specifies two packages that are used for my workload, OrdinaryDiffEq.jl and Trixi.jl, including their dependencies. I would like to add a second environment B that only contains PackageCompiler.jl that allows one to compile a certain workflow using the packages from environment A.
Now, I could add PackageCompiler.jl directly to environment A, but I do not want to do this, since it might pull in additional dependencies that most people do not care about. Thus I would like to mimic the “standard” Julia setup where I have an active project (in this case, A) but where I am also able to load also packages from the default environment (which is in the DEPOT_PATH). The difference here is that I would like to put the “default environment” also in the reproducibility repository and have the users instantiate and use this independently.
EDIT1: Simplified the JULIA_LOAD_PATH command. EDIT2: Remove @stdlib as suggested by @fredrikekre EDIT3: Accept this answer incorporating the help from @fredrikekre to make it easier for future solution seekers.
For the specific case of PackageCompiler you don’t need to stack them though. You can use the project keyword argument instead. In this case you can start Julia in the PackageCompiler project, and then pass the real project to create_sysimg.