How to handle interdependent unregistered packages?

I’ve been running into difficulties with setting up Julia dependency structures including multiple Julia packages, and am hoping for advice on how to proceed.
After some experimentation, it appears to me that Julia’s package manager does not support dependency structures among unregistered packages, if the dependency tree is more than 1 layer deep.

My understanding is that if I have 3 unregistered packages A, B, and C, the package manager supports dependency graph A -> B, but not A -> B -> C.
In particular, if I have that 3-item dependency graph, then when trying to instantiate A, the Julia package manager will fail to figure out what C is.
If I am trying to produce this dependency structure, and I write ]activate A; ]add B, the following error is produced:

C [0984c0e4] log:
 ├─C [0984c0e4] has no known versions!
 └─restricted to versions * by B [0741c818] — no versions left
   └─B [0741c818] log:
     ├─possible versions are: 0.1.0 or uninstalled
     └─B [0741c818] is fixed to version 0.1.0

I think the key line here is C […] has no known versions!.

Does anyone have any advice on how to manage multi-package projects like this until support for this case is added to the package manager? Is my best bet just to also add C directly as a dependency of A?
Is there something relating to registries that I should look into instead? (I have in mind that this isn’t a great solution, since the code is all highly developmental.)

I see that there was some progress on a pull request which may fix this (https://github.com/JuliaLang/Pkg.jl/pull/1628), but it looks like it has been inactive for about a year.

Probably the best solution is to work with a local registry:

https://github.com/GunnarFarneback/LocalRegistry.jl

1 Like

Thank you! I’ll take a look.

Not a solution really, but a workaround that I have been using is to add C to A also (before adding B to A). Then when B is added it will see that the environment has a version of C already and will use it.

1 Like