Please help me figure out why package dependencies are failing

To make things easier. I have replaced the names with PkgA, PkgB and PkgC, so it’s easier to see how the packages should depend on each other.

PkgB depends on PkgA
PkgC also depends on PkgA

All three packages are deved on the machine I’m working on, so I can update compats as necessary (although I’m always unclear where it’s actually looking for the info.) I’m actively developing all three packages.

I’m trying to make PkgC depend on PkgB. I have activated the PkgC environment in Package Mode and am trying to “add PkgB”. The output from package mode looks like this:

(PkgC) pkg> add PkgB
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PkgB:
 PkgB log:
 ├─possible versions are: 0.1.1-0.2.0 or uninstalled
 ├─restricted to versions * by PkgC, leaving only versions: 0.1.1-0.2.0
 │ └─PkgC log:
 │   ├─possible versions are: 0.1.11 or uninstalled
 │   └─PkgC is fixed to version 0.1.11
 └─restricted by compatibility requirements with PkgA to versions: uninstalled — no versions left
   └─PkgA log:
     ├─possible versions are: 0.7.3 or uninstalled
     ├─restricted to versions 0.7 by PkgC, leaving only versions: 0.7.3
     │ └─PkgC log: see above
     └─PkgA is fixed to version 0.7.3

Looking at the compats in all the Project.tomls, I can’t figure out why there’s a complaint here. And why specifically it thinks that PkgB and PkgA are incompatible.

I find these package compatibility issues the most maddening part of Julia.

It seems part of the problem is:

PkgB log:
 ├─possible versions are: 0.1.1-0.2.0 or uninstalled

when the Project.toml of PkgB is on version 0.3.1. Maybe this is the problem, but I don’t know why it can’t find the new version of PkgB. I’ve tried updating, resolving and instantiating all the relevant packages, to no avail

A solution I found (after about an hour of playing around) was to add the explicit path to the dev version. I don’t know why it doesn’t search there first…

so instead of

add PkgB

I need to

add /home/<me>/.julia/dev/PkgB
1 Like

Wirh add you are installing the newest compatible of yor Package that is available in the Registry. If you want to use the deved version of PkgB you can use ] dev PkgB