Compatibility issues: How to read the error?

I encountered this problem several times. I have absolutely no idea how to read the compatibility problems when installing a package doesn’t work.

(v1.1) pkg> add FreeTypeAbstraction
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package FreeTypeAbstraction [663a7486]:
 FreeTypeAbstraction [663a7486] log:
 ├─possible versions are: [0.1.0, 0.2.0, 0.3.0, 0.4.0-0.4.2] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0, 0.3.0, 0.4.0-0.4.2]
 ├─restricted by julia compatibility requirements to versions: 0.4.0-0.4.2 or uninstalled, leaving only versions: 0.4.0-0.4.2
 └─restricted by compatibility requirements with ColorVectorSpace [c3611d14] to versions: uninstalled — no versions left
   └─ColorVectorSpace [c3611d14] log:
     ├─possible versions are: [0.0.1-0.0.5, 0.1.0-0.1.12, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.4, 0.5.0-0.5.2, 0.6.0-0.6.2, 0.7.0] or uninstalled
     └─restricted to versions 0.7.0 by an explicit requirement, leaving only versions 0.7.0

This is not the problem but what does this mean:

restricted to versions * by an explicit requirement

which software requires this explicitly?

This

restricted by compatibility requirements with ColorVectorSpace [c3611d14] to versions: uninstalled — no versions left

reads like ColorVectorSpace disallows the installation of FreeTypeAbstraction which I don’t believe and FreeTypeAbstraction itself requires ColorVectorSpace.

The require file of FreeTypeAbstraction

reads like it needs at least v0.6.0 and I have v0.7.0 installed.

Maybe someone can help me out. Thanks in advance

You have explicitly required to install this package (in this case by giving the add command), without specifying any particular version range.

The line ColorVectorSpace 0.6.0 in the require file makes it incompatible with version 0.7.0. See the explanation here.

1 Like

Thanks for your reply. I should have known that the compatibility system works that way :smile:

So it says restricted to versions uninstalled because there is no version of FreeTypeAbstraction that supports v0.7.0 of ColorVectorSpace, correct?

Yes. From the point of view of the resolver, “uninstalled” is essentially like any other possible version that a package can be in, except that it is the preferred one if available (so that it doesn’t install unnecessary packages).

The way to read those messages is as follows. All packages start with all their possible versions (including “uninstalled”) available. Then those are progressively trimmed. First, by explicit requirements (e.g. you add FreeTypeAbstraction and that removes the “uninstalled” version from the available ones). Then, by julia compatibility. Then, by compatibility restrictions (e.g. it may find that all the remaining versions of some package A are incompatible with some version X.Y.Z of another package B, then that version X.Y.Z is removed from the possible ones of package B).

The issue with reporting this last part of the process is that it walks a complicated dependency graph, and keeps trimming down versions of all packages until nothing changes any more, after which the actual resolving takes place on the surviving versions. So the way that the process is presented is that for each package A it shows each step of the trimming down process, and for any dependency or dependant B that has had an effect on A it creates a sub-list showing what happened with package B’s versions and how it arrived at the result. This is recursive, of course, since package B is undergoing the same process in the meantime.

One issue which is especially hard to report is how exactly the compatibility restrictions were determined. In this case, it is easy: FreeTypeAbstractions depends on version 0.6.0 of ColorVectorSpace, which is unavailable due to another requirement fixing the version to 0.7.0. However, in general it may be a lot more complicated: the compatibility between versions of two packages is represented as a binary matrix, and the solver is taking sub-matrices and determining whether there are entire rows or columns that are all-zero. It is thus hard to figure out how to make that decision human-readable except in the simplest cases.

2 Likes