Precompile to different directories

Is it possible in Pkg2 to soecify that packages in different loadoaths precompike to different directories?

You can set the LOAD_CACHE_PATH environment variable.

But that sets a single global oreconpilation path? I may need to explain the problem when I’m at a keyboard.

So if I’ve understood the problem correctly (I’m just the messenger), then the idea is to give users of a server and of centrally managed workstations a working Julia installation which they cannot modify by making JULIA_PKGDIR read-only, but to let them install new packages in a personal folder.

But because precompilation would try to write to JULIA_PKGDIR, this approach seems to be infeasible.

Any alternatives? Thank you.

As I understand it for Julia 0.6:

JULIA_PKGDIR is the diredctory which Pkg functions use. (Pkg.add() installs into JULIA_PKGDIR)

LOAD_PATH is a list of additional (to JULIA_PKGDIR) directories that Julia searches to find modules.

LOAD_CACHE_PATH is where Julia precompiles modules (from any source location)

So for your situation, one approach would be to add the centrally managed read-only package directory to LOAD_PATH (which should be distinct from JULIA_PKGDIR and from LOAD_CACHE_PATH). This will allow users to use modules from the central location but still install new packages into their personal JULIA_PKGDIR.

That’s a very nie suggestion that I was slowly converging to as well. What about downloading dependencies? Is there any concern?