How to install the latest package given dependency conflicts

In a fresh environment I am trying to install DifferentialEquations and Gnuplot 1.30. If I install DifferentialEquations first, I get the latest copy of the package + all the correct dependencies (particular the dependency OrdinaryDiffEq v5.51.2 which includes some critical bug fixes for me).

Then I add Gnuplot by add Gnuplot, but I am guessing due to dependencies it only installs Gnuplot 1.0 (and keeps all the Diff Eq packages at their current updated versions). However, I would like to use the latest Gnuplot version which is 1.3. I can force 1.30 by add Gnuplot@1.30 but this severely downgrades some of the packages DifferentialEquations relied on. For example,

(julpack) pkg> add Gnuplot@1.3
  Resolving package versions...
Updating `~/julpack/Project.toml`
  [dc211083] + Gnuplot v1.3.0
Updating `~/julpack/Manifest.toml`
  [c3fe647b] ↓ AbstractAlgebra v0.13.6 ⇒ v0.11.2
  [4fba245c] ↓ ArrayInterface v3.1.3 ⇒ v2.14.17
  [4c555306] ↓ ArrayLayouts v0.6.2 ⇒ v0.3.8
  [aae01518] ↓ BandedMatrices v0.16.5 ⇒ v0.15.15
 ...
  [864edb3b] ↓ DataStructures v0.18.9 ⇒ v0.17.20
  [bcd4f6db] ↓ DelayDiffEq v5.29.0 ⇒ v5.24.1
  [2b5f629d] ↓ DiffEqBase v6.57.7 ⇒ v6.44.3
  [459566f4] ↓ DiffEqCallbacks v2.16.0 ⇒ v2.13.5
  [c894b116] ↓ DiffEqJump v6.13.0 ⇒ v6.10.0
  [31c24e10] ↓ Distributions v0.24.15 ⇒ v0.23.8
 ...
  [90137ffa] ↓ StaticArrays v1.0.1 ⇒ v0.12.5

In particular, you see the OrdinaryDiffEq was downgraded all the way to [1dea7af3] ↓ OrdinaryDiffEq v5.51.2 ⇒ v5.39.1. Some other packages like StaticArrays are downgraded to very old versions.

How do I solve this issue? Is there a tool that will generate the dependency graph so I can track down which package is forcing a downgrade of the Diff Eq suite? I tried adding the #master plan but this also causes the same downgrade issue. Evening dev Gnuplot causes the same issue.

Edit: Solved by tracing the dependencies. See post How to install the latest package given dependency conflicts - #6 by affans

This might help, but doesn’t solve it.

I also don’t understand why the downgrade is happening. If I track down the dependencies of Gnuplot on JuliaHub, nothing really seems to depend on Diff Eq.

Another way to check this is to look at the dependents of DifferentialEquations on JuliaHub. It dosn’t seem like there is anything that connects back to Gnuplot somehow.

Something else I noticed. If I pin OrdinaryDiffEq to 5.51.2 which is the one with bug fixes, I can force an error but the error dosn’t make sense to me.

(julpack) pkg> add Gnuplot@1.3.0
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataStructures [864edb3b]:
 DataStructures [864edb3b] log:
 ├─possible versions are: [0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0, 0.14.0-0.14.1, 0.15.0, 0.16.1, 0.17.0-0.17.20, 0.18.0-0.18.9] or uninstalled
 ├─restricted by compatibility requirements with OrdinaryDiffEq [1dea7af3] to versions: 0.18.0-0.18.9
 │ └─OrdinaryDiffEq [1dea7af3] log:
 │   ├─possible versions are: [4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0-4.4.1, 4.5.0, 4.6.0, 4.7.0-4.7.1, 4.8.0-4.8.1, 4.9.0, 4.10.0, 4.11.0-4.11.1, 4.12.0-4.12.4, 4.13.0, 4.14.0, 4.15.0-4.15.1, 4.16.0-4.16.5, 4.17.0-4.17.2, 4.18.0-4.18.3, 4.19.0, 4.20.0, 4.21.0-4.21.1, 5.0.0, 5.1.0-5.1.4, 5.2.0-5.2.1, 5.3.0, 5.4.0-5.4.1, 5.5.0, 5.6.0-5.6.1, 5.7.0-5.7.1, 5.8.0-5.8.1, 5.9.0, 5.10.0, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0, 5.15.0-5.15.1, 5.16.0, 5.17.0-5.17.2, 5.18.0, 5.19.0, 5.20.0-5.20.1, 5.21.0, 5.22.0, 5.23.0, 5.24.0, 5.25.0, 5.26.0-5.26.8, 5.27.0-5.27.1, 5.28.0-5.28.1, 5.29.0, 5.30.0, 5.31.0, 5.32.0-5.32.2, 5.33.0, 5.34.0-5.34.1, 5.35.0-5.35.5, 5.36.0-5.36.1, 5.37.0, 5.38.0-5.38.3, 5.39.0-5.39.1, 5.40.0, 5.41.0, 5.42.0-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2] or uninstalled
 │   └─restricted to versions 5.51.2 by an explicit requirement, leaving only versions 5.51.2
 └─restricted by compatibility requirements with Gnuplot [dc211083] to versions: 0.17.0-0.17.20 — no versions left
   └─Gnuplot [dc211083] log:
     ├─possible versions are: [1.0.0, 1.1.0, 1.2.0, 1.3.0] or uninstalled
     └─restricted to versions 1.3.0 by an explicit requirement, leaving only versions 1.3.0

It says possible versions are [for OrdinaryDiffEq] are [5.51.0 - 5.51.2] so it shouldn’t really downgrade since… well I have 5.51.2 for OrdinaryDiffEq

I would assume that both Gnuplot and OrdinaryDiffEq depend on DataStructures, directly or indirectly, but require mutually contradictory versions unless one of them is held back to an older version.

Update: Proposed fix in https://github.com/gcalderone/Gnuplot.jl/pull/41.

Thanks. Based on our Slack discussion the problem is that Gnuplot depends on DataStructures = "^0.17" while OrdinaryDiffEq depends on DataStructures = "0.18".

Although I was under the impression that ^0.17 means anything 0.17 and above but not 1.0 since it changes the left most digit. This is not true. ^0.17 means anything 0.17.x but not 0.18.

Just for reference: “A pre-1.0 version with non-zero minor version ( 0.a.b with a != 0 ) is considered compatible with versions with the same minor version and smaller or equal patch versions ( 0.a.c with c <= b ); i.e., the versions 0.2.2 and 0.2.3 are compatible with 0.2.1 and 0.2.0. Versions with a major version of 0 and different minor versions are not considered compatible, so the version 0.3.0 might have breaking changes from 0.2.0.”