New Pkg - local packages / shared depot

I have been testing Julia 1.0 for a while and have some questions about the new Pkg, regarding some features that would fit my needs considering some restrictions I need to work with.

First of all, the new Pkg does not work with packages that aren’t git repositories, right? I used to download tar files (without .git folder) and manually add to PKGDIR on julia 0.6.x, but now I need to clone the repository.

That leads me to my second question. I see that choosing a package version when installing (eg. ] add Compat@v1.0.1) is a Pkg feature. But what if I clone a repository (I need to use local repos) and try to “] add /path/to/Compat@v1.0.1”, it should work the same way, right? In my tests I was only able to install the master branch even adding “@v1.0.1”.

On v0.6.x I used to change LOAD_CACHE_PATH. On v1.0.0 it seems that I can only change DEPOT_PATH.
So, first, is there a way to change the compiled packages path, regardless of the DEPOT_PATH? Also, is DEPOT_PATH supposed to work well in a shared environment. On some tests I was able to change groups and permissions for reading and it is working, but I wonder if it might break at some point if it’s not the default Julia way of handling the packages. The idea is that only me as admin will have write permission.

This seems like a job for dev / develop. Put the files wherever you want, and then do

pkg> dev path/to/files

You can do the same as above, and git checkout v1.0.1 in the folder that you devd.

1 Like

Oh, that’s really useful! Thanks @fredrikekre

PS: Someone else has any ideas on the other questions?

I could actually host my own registries making some patches on JuliaRegistries/General. Will Julia work with it, or does the General registries need to come from Github?

Yea you can have your own registry in ~/.julia/registries.