Confused by "unsatisfiable requirements"

I have recently upgraded my package SimpleGraphs to version 0.6.1. Other packages that depend on it now can only be used in development mode. For example, my registered package SimpleGraphAlgorithms has this problem:

(@v1.5) pkg> free SimpleGraphAlgorithms
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SimpleGraphAlgorithms [41400c72]:
 SimpleGraphAlgorithms [41400c72] log:
 ├─possible versions are: [0.0.1, 0.1.0-0.1.1, 0.1.3, 0.2.0, 0.3.0-0.3.5, 0.4.0-0.4.3] or uninstalled
 ├─restricted to versions 0 by SimplePosetAlgorithms [0c1320c5], leaving only versions [0.0.1, 0.1.0-0.1.1, 0.1.3, 0.2.0, 0.3.0-0.3.5, 0.4.0-0.4.3]
 │ └─SimplePosetAlgorithms [0c1320c5] log:
 │   ├─possible versions are: 0.4.0 or uninstalled
 │   └─SimplePosetAlgorithms [0c1320c5] is fixed to version 0.4.0
 └─restricted by compatibility requirements with SimpleGraphs [55797a34] to versions: uninstalled — no versions left
   └─SimpleGraphs [55797a34] log:
     ├─possible versions are: [0.2.3-0.2.10, 0.3.0, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.1] or uninstalled
     ├─restricted to versions 0.6 by DrawSimpleGraphs [1d51b185], leaving only versions 0.6.0-0.6.1
     │ └─DrawSimpleGraphs [1d51b185] log:
     │   ├─possible versions are: 0.2.1 or uninstalled
     │   └─DrawSimpleGraphs [1d51b185] is fixed to version 0.2.1
     └─restricted to versions 0.6.1 by an explicit requirement, leaving only versions 0.6.1

I had no problem with SimpleGraphs when it was set to a version number of the form 0.5.x.

The Project.toml file for SimpleGraphAlgorithms has this:

name = "SimpleGraphAlgorithms"
uuid = "41400c72-0c58-5c16-8579-4ecbce768449"
version = "0.4.3"

[deps]
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
ChooseOptimizer = "858a232f-1959-5553-8cfc-91e1fd5304e2"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SimpleGraphs = "55797a34-41de-5266-9ec1-32ac4eb504d3"
SimplePartitions = "ec83eff0-a5b5-5643-ae32-5cbf6eedec9d"
SimplePolynomials = "cc47b68c-3164-5771-a705-2bc0097375a0"

[compat]
julia = "1"
Cbc = "0"
ChooseOptimizer = "0"
JuMP = "0"
SimplePolynomials = "0"
SimpleGraphs = "0"
SimplePartitions = "0"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

I thought the line SimpleGraphs = "0" means that any version of the form 0.x.x should work. Why is there are difference when I upgraded from 0.5.3 to 0.6.0 and then to 0.6.1?

Thanks.

No. Semantic Versioning 2.0.0 rule 4 says:

Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.

If you are using packages below version 1.0.0 you should either:

  • Fix the exact version of the package.
  • Check if the package specifically follows the convention that patch versions do not introduce breakage even below version 1.0.0 and then fix 0.y.

Otherwise you will have breakage.

1 Like

Thanks but I’m still confused. I had no problems when SimpleGraphs was at version 0.5.3 but now I’m having problems with other packages when I tagged SimpleGraphs at 0.6.0. All that happened (I own all the packages involved) is that I added new features to SimpleGraphs. I’m really unsure of what file(s) I need to edit to resolve this problem.

This is probably due to the recent retro-capping.

I’ll make a PR to General to relax some of the caps for your packages.

Can you provide me with a full list of your packages that you want to have compatibility with SimpleGraphs 0.6?

1 Like

THANK YOU!! I now understand what I need to do in the [compat] entries in my project files. And I appreciate that you took the time to go through my packages and suggest the changes. I’ll look at those carefully later (I hope today, but soon).

What I still don’t understand is why this is a problem all of a sudden. Everything was working fine when SimpleGraphs was at 0.5.x but then went nuts at 0.6.x.

2 Likes

Probably due to Adding "caps" (upper-bounded `[compat]` entries) to all packages in the General registry

3 Likes

Thank you again @dilumaluthge for your help. Most of the problems are resolved (I think) but I still have this:

(@v1.5) pkg> free DrawSimpleGraphs
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SimpleGraphs [55797a34]:
 SimpleGraphs [55797a34] log:
 ├─possible versions are: [0.2.3-0.2.10, 0.3.0, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.1] or uninstalled
 ├─restricted to versions 0.1-0.6 by Mazes [2e5c213e], leaving only versions [0.2.3-0.2.10, 0.3.0, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.1]
 │ └─Mazes [2e5c213e] log:
 │   ├─possible versions are: 0.1.0 or uninstalled
 │   └─Mazes [2e5c213e] is fixed to version 0.1.0
 ├─restricted to versions 0.6.1 by an explicit requirement, leaving only versions 0.6.1
 └─restricted by compatibility requirements with DrawSimpleGraphs [1d51b185] to versions: [0.2.3-0.2.10, 0.3.0, 0.4.0-0.4.4, 0.5.0-0.5.3] — no versions left
   └─DrawSimpleGraphs [1d51b185] log:
     ├─possible versions are: [0.1.0-0.1.2, 0.2.0-0.2.1] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.1.0-0.1.2, 0.2.0-0.2.1]

Here is the Project.toml file for DrawSimpleGraphs:

name = "DrawSimpleGraphs"
uuid = "1d51b185-1a84-59cf-b84e-03b0e3da30b7"
version = "0.2.1"

[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SimpleDrawing = "d78a06e8-ae74-583c-9a07-0d6572347000"
SimpleGraphs = "55797a34-41de-5266-9ec1-32ac4eb504d3"

[compat]
julia = "1"
Plots = "1"
SimpleDrawing = "0.0.1, 0.1, 0.2"
SimpleGraphs = "0.5, 0.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

and for Mazes:

name = "Mazes"
uuid = "2e5c213e-ab15-5c8d-991f-abb7b09c23af"
version = "0.1.0"

[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SimpleDrawing = "d78a06e8-ae74-583c-9a07-0d6572347000"
SimpleGraphs = "55797a34-41de-5266-9ec1-32ac4eb504d3"
SimplePartitions = "ec83eff0-a5b5-5643-ae32-5cbf6eedec9d"

[compat]
julia = "1"
Plots = "1"
SimpleDrawing = "0.1, 0.2"
SimpleGraphs = "0.1, 0.2, 0.3, 0.4, 0.5, 0.6"
SimplePartitions = "0.2, 0.3"

If you would kindly tell me what to change, I’ll do it gladly!

Those Project.toml files look correct. Can you make new patch releases of those packages? That should fix the issue.

Do you mean register them on JuliaHub? With a slightly increased version number??

1 Like

Yep! Just register a new patch version of each of those packages, using whatever method you use for registering. (I remember that you like JuliaHub.)

This will update the General registry with the information from your Project.toml files.

2 Likes

Thanks again @dilumaluthge!! Everything is back to working order.

2 Likes