# Unclear where compatibility requirements are coming from

**URL:** https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681
**Category:** New to Julia
**Tags:** package-manager, compatibility
**Created:** [May 11, 2023, 1:45pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681 "2023-05-11T13:45:08Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)
#### Post date: [May 11, 2023, 1:45pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/1 "2023-05-11T13:45:08Z")

</div>

I’m trying to develop on a fork of the ForwardDiff.jl package (current master commit). When I try to add the repo to my dependencies I get the following compatibility error:

```julia
(@v1.9) pkg> dev /Users/olly/.julia/dev/ForwardDiff.jl
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Zygote [e88e6eb3]:
 Zygote [e88e6eb3] log:
 ├─possible versions are: 0.1.0-0.6.60 or uninstalled
 ├─restricted by compatibility requirements with SpecialFunctions [276daf66] to versions: [0.4.21-0.5.1, 0.5.13-0.6.60] or uninstalled, leaving only versions: [0.4.21-0.5.1, 0.5.13-0.6.60]
 │ └─SpecialFunctions [276daf66] log:
 │ ├─possible versions are: 0.7.0-2.2.0 or uninstalled
 │ └─restricted to versions 1-2 by ForwardDiff [f6369f11], leaving only versions: 1.0.0-2.2.0
 │ └─ForwardDiff [f6369f11] log:
 │ ├─possible versions are: 0.11.0 or uninstalled
 │ └─ForwardDiff [f6369f11] is fixed to version 0.11.0-DEV
 ├─restricted by compatibility requirements with NaNMath [77ba4419] to versions: [0.4.21-0.5.1, 0.6.35-0.6.60] or uninstalled, leaving only versions: [0.4.21-0.5.1, 0.6.35-0.6.60]
 │ └─NaNMath [77ba4419] log:
 │ ├─possible versions are: 0.3.2-1.0.2 or uninstalled
 │ └─restricted to versions 1 by ForwardDiff [f6369f11], leaving only versions: 1.0.0-1.0.2
 │ └─ForwardDiff [f6369f11] log: see above
 └─restricted by compatibility requirements with ForwardDiff [f6369f11] to versions: uninstalled — no versions left
   └─ForwardDiff [f6369f11] log: see above

```

I don’t understand why this error is happening. I do not see any references to compatibility versions for Zygote in the [project.toml](https://github.com/JuliaDiff/ForwardDiff.jl/blob/master/Project.toml) file.

I get a similar issue for LoopVectorization.jl when trying to use this local version of ForwardDiff.jl in another project. Again, there is no mention of LoopVectorization in the [compat] section of ForwardDiff’s [project.toml](https://github.com/JuliaDiff/ForwardDiff.jl/blob/master/Project.toml) file.

What is going on here?

---

<div class="post-metadata">

### Author: ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)
#### Post date: [May 11, 2023, 2:49pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/2 "2023-05-11T14:49:36Z")

</div>

Here is the other error:

```julia
(NLLSsolver) pkg> dev /Users/olly/.julia/dev/ForwardDiff.jl
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LoopVectorization [bdcacae8]:
 LoopVectorization [bdcacae8] log:
 ├─possible versions are: 0.1.0-0.12.159 or uninstalled
 ├─restricted by julia compatibility requirements to versions: 0.9.0-0.12.159 or uninstalled
 ├─restricted by compatibility requirements with ForwardDiff [f6369f11] to versions: 0.1.0-0.12.99 or uninstalled, leaving only versions: 0.9.0-0.12.99 or uninstalled
 │ └─ForwardDiff [f6369f11] log:
 │ ├─possible versions are: 0.11.0 or uninstalled
 │ └─ForwardDiff [f6369f11] is fixed to version 0.11.0-DEV
 ├─restricted by compatibility requirements with VectorizationBase [3d5dd08c] to versions: 0.12.19-0.12.159 or uninstalled, leaving only versions: 0.12.19-0.12.99 or uninstalled
 │ └─VectorizationBase [3d5dd08c] log:
 │ ├─possible versions are: 0.1.0-0.21.64 or uninstalled
 │ ├─restricted by julia compatibility requirements to versions: 0.20.8-0.21.64 or uninstalled
 │ └─restricted by compatibility requirements with ArrayInterface [4fba245c] to versions: [0.1.0-0.12.33, 0.21.59-0.21.64] or uninstalled, leaving only versions: 0.21.59-0.21.64 or uninstalled
 │ └─ArrayInterface [4fba245c] log:
 │ ├─possible versions are: 0.0.1-7.4.3 or uninstalled
 │ └─restricted by compatibility requirements with LinearSolve [7ed4a6bd] to versions: 7.3.0-7.4.3
 │ └─LinearSolve [7ed4a6bd] log:
 │ ├─possible versions are: 0.1.0-1.42.0 or uninstalled
 │ └─restricted to versions 1.41.1-1 by NLLSsolver [50b5cf9e], leaving only versions: 1.41.1-1.42.0
 │ └─NLLSsolver [50b5cf9e] log:
 │ ├─possible versions are: 2.0.0 or uninstalled
 │ └─NLLSsolver [50b5cf9e] is fixed to version 2.0.0
 ├─restricted by compatibility requirements with ArrayInterface [4fba245c] to versions: [0.1.0-0.8.26, 0.12.151-0.12.159] or uninstalled, leaving only versions: uninstalled
 │ └─ArrayInterface [4fba245c] log: see above
 └─restricted by compatibility requirements with RecursiveFactorization [f2c3362d] to versions: 0.10.0-0.12.159 — no versions left
   └─RecursiveFactorization [f2c3362d] log:
     ├─possible versions are: 0.0.1-0.2.18 or uninstalled
     └─restricted by compatibility requirements with LinearSolve [7ed4a6bd] to versions: 0.2.8-0.2.18
       └─LinearSolve [7ed4a6bd] log: see above

```

I do not understand where the following requirments on LoopVectorization come from:

> restricted by compatibility requirements with ForwardDiff [f6369f11] to versions: 0.1.0-0.12.99 or uninstalled

As I say, there is nothing about this in the [project.toml](https://github.com/JuliaDiff/ForwardDiff.jl/blob/master/Project.toml) file, so I don’t understand where it comes from.

---

<div class="post-metadata">

### Author: ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)
#### Post date: [May 11, 2023, 3:14pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/3 "2023-05-11T15:14:49Z")

</div>

I have deleted (then regenerated) the auto-generated manifest.toml files from the relevant projects, but this doesn’t fix the issue. The errors remain the same.

---

<div class="post-metadata">

### Author: ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)
#### Post date: [May 11, 2023, 3:54pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/4 "2023-05-11T15:54:27Z")

</div>

I think I understand where the LoopVectorization compatibility issue comes from. [LoopVectorization itself specifies a version of ForwardDiff it is compatible with](https://github.com/JuliaSIMD/LoopVectorization.jl/commit/19dc445c74183fea2a09b3634f217ed7a02dcce1), so one needs to go back to the version before that occurred for it to be compatible.

@Elrod Is there a reason not to use:

```julia
[compat]
ForwardDiff = ">= 0.9"

```

?

---

<div class="post-metadata">

### Author: ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)
#### Post date: [May 11, 2023, 3:58pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/5 "2023-05-11T15:58:07Z")

</div>

What you’re seeing is conflicts from packages which depend on ForwardDiff ([Zygote](https://github.com/FluxML/Zygote.jl/blob/v0.6.60/Project.toml#L38), [LoopVectorization](https://github.com/JuliaSIMD/LoopVectorization.jl/blob/v0.12.159/Project.toml#L37)) and not the other way around. The first error should be easy enough to fix by removing non-utility packages like Zygote from your global environment and/or `] dev`ing packages into a separate environment. However, that’s exactly what you’ve done for the second error (separate environment), and it looks like you’ve found the compat issue

> [@user664303](#):
>
> @Elrod Is there a reason not to use:
> 
> ```julia
> [compat]
> ForwardDiff = ">= 0.9"
> 
> ```

It’s not very SemVer friendly, because ForwardDiff 0.9 → 0.10 → 0.11 are all breaking changes.

---

<div class="post-metadata">

### Author: ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)
#### Post date: [May 11, 2023, 6:41pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/6 "2023-05-11T18:41:12Z")

</div>

> [@ToucheSir](#):
>
> > [@user664303](#):
> >
> > ```julia
> > 
> > ```
> 
> It’s not very SemVer friendly, because ForwardDiff 0.9 → 0.10 → 0.11 are all breaking changes.

Yes. Best practice there is to not make breaking changes, so that you don’t need to bump ForwardDiff from 0.10 → 0.11.

But if you have to, you can `dev` other packages you want to use to update them, and then be prepared to make PRs to them, too.

I thought [ColPrac](https://github.com/SciML/ColPrac) demanded that, but couldn’t find any statement to that effect on the page.

---

<div class="post-metadata">

### Author: ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)
#### Post date: [May 11, 2023, 6:51pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/7 "2023-05-11T18:51:51Z")

</div>

ColPrac does recommend [GitHub - SciML/ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac#unreleased-changes-and--dev) which would’ve prevented the dependency clash here, but in FowardDiff’s case I believe the 0.11 version bump was done out of necessity to work around unforeseen backwards compat challenges.

---

<div class="post-metadata">

### Author: ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)
#### Post date: [May 23, 2023, 12:01pm UTC](https://discourse.julialang.org/t/unclear-where-compatibility-requirements-are-coming-from/98681/8 "2023-05-23T12:01:05Z")

</div>

Got it! Thank you, both.
