# Package incompatibility

**URL:** <https://discourse.julialang.org/t/package-incompatibility/46420>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [September 10, 2020, 10:39pm UTC](https://discourse.julialang.org/t/package-incompatibility/46420 "2020-09-10T22:39:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [September 10, 2020, 10:39pm UTC](https://discourse.julialang.org/t/package-incompatibility/46420/1 "2020-09-10T22:39:18Z")

</div>

I’m trying to find out what is holding back `DataStructures` package.  
Installed version is `v0.17.20`, latest version is `0.18.4`.

Attempting to explicitly add the latest version of `DataStructures` reveals a seemingly weird incompatibility with `ReverseDiffSparse`, `JuMP` and `Compat`.

It seems `ReverseDiffSparse` is used by older versions of `JuMP`, but is not a dependency of the current and installed version (`JuMP` `0.21.3`), and `ReverseDiffSparse` does not appear in my `Project.toml` or `Manifest.toml` files.

```julia
(v1.5) pkg> add DataStructures@0.18.4
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package ReverseDiffSparse [89212889]:
 ReverseDiffSparse [89212889] log:
 ├─possible versions are: 0.8.2-0.8.6 or uninstalled
 ├─restricted by compatibility requirements with Compat [34da2185] to versions: uninstalled
 │ └─Compat [34da2185] log:
 │ ├─possible versions are: [1.0.0-1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0-1.5.1, 2.0.0, 2.1.0, 2.2.0-2.2.1, 3.0.0, 3.1.0, 3.2.0, 3.3.0-3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0-3.9.1, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.15.0] or uninstalled
 │ └─restricted by compatibility requirements with DataStructures [864edb3b] to versions: [3.0.0, 3.1.0, 3.2.0, 3.3.0-3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0-3.9.1, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.15.0]
 │ └─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.4] or uninstalled
 │ └─restricted to versions 0.18.4 by an explicit requirement, leaving only versions 0.18.4
 └─restricted by compatibility requirements with JuMP [4076af6c] to versions: 0.8.2-0.8.6 — no versions left
   └─JuMP [4076af6c] log:
     ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
     ├─restricted to versions * by an explicit requirement, leaving only versions [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3]
     ├─restricted by compatibility requirements with DataStructures [864edb3b] to versions: 0.18.3-0.18.6 or uninstalled, leaving only versions: 0.18.3-0.18.6
     │ └─DataStructures [864edb3b] log: see above
     └─restricted by compatibility requirements with Compat [34da2185] to versions: [0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled, leaving only versions: 0.18.6
       └─Compat [34da2185] log: see above

```

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [September 10, 2020, 10:59pm UTC](https://discourse.julialang.org/t/package-incompatibility/46420/2 "2020-09-10T22:59:20Z")

</div>

I may be missing something here, but which `Project.toml` or `Manifest.toml` are you talking about, the `(v1.5) pkg>` give me the impression you are not inside a specific environment, is it correct?

Unfortunately the log seems specially hard to understand (I often can pinpoint the source of the problem by it). It seems kinda of cyclical? You cannot update `DataStructures` because `JuMP` and `JuMP` cannot update because `DataStructures`. I would recommend `rm`ing all packages involved and installing them again starting by `DataStructures@0.18.4` this will either work or give a better understanding of where the problem pops up.

---

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [September 10, 2020, 11:29pm UTC](https://discourse.julialang.org/t/package-incompatibility/46420/3 "2020-09-10T23:29:09Z")

</div>

> [@Henrique\_Becker](#):
>
> I may be missing something here, but which `Project.toml` or `Manifest.toml` are you talking about, the `(v1.5) pkg>` give me the impression you are not inside a specific environment, is it correct?

Yeah, I just meant the `Project.toml` and `Manifest.toml` in the default environment at `~.julia/environments/v1.5`

Here’s what happens after removing `DataStructures` and `JuMP`.

After `up`, `DataStructures` (as a dependency) is upgraded to `0.18.4`:

```julia
(v1.5) pkg> up
   Updating registry at `...\.julia\registries\General`
No Changes to `...\.julia\environments\v1.5\Project.toml`
Updating `...\.julia\environments\v1.5\Manifest.toml`
  [864edb3b] ↑ DataStructures v0.17.20 ⇒ v0.18.4

```

Now `add` back `DataStructures` and `JuMP`:

```julia
(v1.5) pkg> add DataStructures
  Resolving package versions...
No Changes to `...\.julia\environments\v1.5\Project.toml`
No Changes to `...\.julia\environments\v1.5\Manifest.toml`

(v1.5) pkg> add JuMP
  Resolving package versions...
Updating `...\.julia\environments\v1.5\Project.toml`
  [864edb3b] ↓ DataStructures v0.18.4 ⇒ v0.17.20
  [4076af6c] + JuMP v0.21.3
Updating `...\.julia\environments\v1.5\Manifest.toml`
  [49dc2e85] + Calculus v0.5.1
  [864edb3b] ↓ DataStructures v0.18.4 ⇒ v0.17.20
  [4076af6c] + JuMP v0.21.3

```

Adding `JuMP` seems to downgrade `DataStructures`.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [September 11, 2020, 12:00am UTC](https://discourse.julialang.org/t/package-incompatibility/46420/4 "2020-09-11T00:00:59Z")

</div>

[Yes, it seems right.](https://github.com/jump-dev/JuMP.jl/blob/e2fd3ebd9e3f5e6913ba461c0bc54e5cc92f061e/Project.toml#L20)

Maybe you should ping JuMP developers about it? Open an issue, or maybe ask if it will be changed in the next update using [this chat](https://gitter.im/JuliaOpt/JuMP-dev).

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [September 11, 2020, 12:11am UTC](https://discourse.julialang.org/t/package-incompatibility/46420/5 "2020-09-11T00:11:04Z")

</div>

What happens if you do this:

```julia
] add DataStructures@0.18.4 JuMP@0.21.3

```

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [September 11, 2020, 12:14am UTC](https://discourse.julialang.org/t/package-incompatibility/46420/6 "2020-09-11T00:14:46Z")

</div>

And then, can you also try this?

```julia
] add DataStructures@0.18.4 JuMP#master

```

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [September 11, 2020, 12:18am UTC](https://discourse.julialang.org/t/package-incompatibility/46420/7 "2020-09-11T00:18:32Z")

</div>

This should be fixed by making a new release of JuMP. I’ve opened an issue here: [https://github.com/jump-dev/JuMP.jl/issues/2326](https://github.com/jump-dev/JuMP.jl/issues/2326)

---

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [September 11, 2020, 12:29am UTC](https://discourse.julialang.org/t/package-incompatibility/46420/8 "2020-09-11T00:29:27Z")

</div>

Yes upgrading to `JuMP#master` fixes the issue.

This is what confused me.  
I looked at `Project.toml` of `JuMP` online (which is of course master), and allows `DataStructures@0.18`  
I should have been looking at `Project.toml` from `JuMP@0.21.3`.

Thanks all for your help!

```julia
(v1.5) pkg> add DataStructures@0.18.4 JuMP@0.21.3
  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.4] or uninstalled
 ├─restricted to versions 0.18.4 by an explicit requirement, leaving only versions 0.18.4
 └─restricted by compatibility requirements with JuMP [4076af6c] to versions: 0.17.0-0.17.20 — no versions left
   └─JuMP [4076af6c] log:
     ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
     └─restricted to versions 0.21.3 by an explicit requirement, leaving only versions 0.21.3

(v1.5) pkg> add DataStructures@0.18.4 JuMP#master
    Cloning git-repo `https://github.com/jump-dev/JuMP.jl.git`
   Updating git-repo `https://github.com/jump-dev/JuMP.jl.git`
  Resolving package versions...
Updating `...\.julia\environments\v1.5\Project.toml`
  [864edb3b] ↑ DataStructures v0.17.20 ⇒ v0.18.4
  [4076af6c] ~ JuMP v0.21.3 ⇒ v0.21.3 `https://github.com/jump-dev/JuMP.jl.git#master`
Updating `...\.julia\environments\v1.5\Manifest.toml`
  [864edb3b] ↑ DataStructures v0.17.20 ⇒ v0.18.4
  [4076af6c] ~ JuMP v0.21.3 ⇒ v0.21.3 `https://github.com/jump-dev/JuMP.jl.git#master`

```

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [September 11, 2020, 2:13am UTC](https://discourse.julialang.org/t/package-incompatibility/46420/9 "2020-09-11T02:13:36Z")

</div>

You could also do `] add JuMP DataStructures@0.17` while we sort out a new release.
