# Need help to fix a Pluto downgrade when adding another package

**URL:** https://discourse.julialang.org/t/need-help-to-fix-a-pluto-downgrade-when-adding-another-package/82698
**Category:** Package Management
**Tags:** question
**Created:** [June 13, 2022, 6:10pm UTC](https://discourse.julialang.org/t/need-help-to-fix-a-pluto-downgrade-when-adding-another-package/82698 "2022-06-13T18:10:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)
#### Post date: [June 13, 2022, 6:10pm UTC](https://discourse.julialang.org/t/need-help-to-fix-a-pluto-downgrade-when-adding-another-package/82698/1 "2022-06-13T18:10:08Z")

</div>

Adding a package is downgrading Pluto, an MWE showing the error is shown below.  
Can it be solved ? Or how to find out where to file an issue ?  
[Interpreting and resolving version conflicts](https://pkgdocs.julialang.org/v1/managing-packages/#conflicts) is usually enough, but I’d need some help here.

```julia
pkg> activate --temp
(jl_RSzy0a) pkg> add CairoMakie
(jl_RSzy0a) pkg> add Pluto
(jl_RSzy0a) pkg> status
      Status `/tmp/jl_RSzy0a/Project.toml`
  [13f3f980] CairoMakie v0.8.5
  [c3e4b0f8] Pluto v0.19.8

# so far so good

(jl_RSzy0a) pkg> add QuantumOptics
  [6e0679c1] + QuantumOptics v1.0.4
...
  [34da2185] ↓ Compat v4.1.0 ⇒ v3.45.0
...
  [77ba4419] ↓ NaNMath v1.0.0 ⇒ v0.3.7

# In my real environment
# (CairoMakie, Combinatorics, DataFrames, HDF5, LaTeXStrings, MakieTeX,
# OffsetArrays, Parameters, PhysicalConstants, PlutoExtracters, PlutoLinks,
# PlutoUI, StatsBase, UnicodePlots, Unitful)
# those downgrades trigger a downgrade of Pluto...

# now with --preserve=all
pkg> activate --temp

(jl_b6Cy3c) pkg> add CairoMakie

(jl_b6Cy3c) pkg> add Pluto

(jl_b6Cy3c) pkg> status
      Status `/tmp/jl_b6Cy3c/Project.toml`
  [13f3f980] CairoMakie v0.8.5
  [c3e4b0f8] Pluto v0.19.8

(jl_b6Cy3c) pkg> status -m NaNMath
      Status `/tmp/jl_b6Cy3c/Manifest.toml`
  [77ba4419] NaNMath v1.0.0

# found --preserve there (thanks !):
# https://discourse.julialang.org/t/it-takes-several-minutes-to-add-a-single-package/70704/7
(jl_b6Cy3c) pkg> add --preserve=all QuantumOptics
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package NLsolve [2774e3e8]:
 NLsolve [2774e3e8] log:
 ├─possible versions are: 4.0.0-4.5.1 or uninstalled
 ├─restricted by compatibility requirements with Reexport [189a3867] to versions: 4.5.1 or uninstalled
 │ └─Reexport [189a3867] log:
 │ ├─possible versions are: 0.2.0-1.2.2 or uninstalled
 │ └─restricted to versions 1.2.2 by an explicit requirement, leaving only versions 1.2.2
 ├─restricted by compatibility requirements with OrdinaryDiffEq [1dea7af3] to versions: 4.3.0-4.5.1, leaving only versions: 4.5.1
 │ └─OrdinaryDiffEq [1dea7af3] log:
 │ ├─possible versions are: 4.0.0-6.15.0 or uninstalled
 │ ├─restricted by compatibility requirements with QuantumOptics [6e0679c1] to versions: 4.0.0-6.15.0
 │ │ └─QuantumOptics [6e0679c1] log:
 │ │ ├─possible versions are: 0.5.5-1.0.4 or uninstalled
 │ │ ├─restricted to versions * by an explicit requirement, leaving only versions 0.5.5-1.0.4
 │ │ ├─restricted by compatibility requirements with Compat [34da2185] to versions: 0.6.0-1.0.4 or uninstalled, leaving only versions: 0.6.0-1.0.4
 │ │ │ └─Compat [34da2185] log:
 │ │ │ ├─possible versions are: 1.0.0-4.1.0 or uninstalled
 │ │ │ └─restricted to versions 4.1.0 by an explicit requirement, leaving only versions 4.1.0
 │ │ ├─restricted by compatibility requirements with FFTW [7a1cc6ca] to versions: [0.5.5, 0.6.6-1.0.4] or uninstalled, leaving only versions: 0.6.6-1.0.4
 │ │ │ └─FFTW [7a1cc6ca] log:
 │ │ │ ├─possible versions are: 0.1.0-1.4.6 or uninstalled
 │ │ │ └─restricted to versions 1.4.6 by an explicit requirement, leaving only versions 1.4.6
 │ │ └─restricted by compatibility requirements with Reexport [189a3867] to versions: [0.5.5-0.6.8, 0.8.3-1.0.4] or uninstalled, leaving only versions: [0.6.6-0.6.8, 0.8.3-1.0.4]
 │ │ └─Reexport [189a3867] log: see above
 │ ├─restricted by compatibility requirements with DataStructures [864edb3b] to versions: 5.42.4-6.15.0 or uninstalled, leaving only versions: 5.42.4-6.15.0
 │ │ └─DataStructures [864edb3b] log:
 │ │ ├─possible versions are: 0.9.0-0.18.13 or uninstalled
 │ │ └─restricted to versions 0.18.13 by an explicit requirement, leaving only versions 0.18.13
 │ ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: 5.46.0-6.15.0 or uninstalled, leaving only versions: 5.46.0-6.15.0
 │ │ └─StaticArrays [90137ffa] log:
 │ │ ├─possible versions are: 0.8.0-1.4.7 or uninstalled
 │ │ └─restricted to versions 1.4.7 by an explicit requirement, leaving only versions 1.4.7
 │ └─restricted by compatibility requirements with Adapt [79e6a3ab] to versions: [4.0.0-5.39.1, 5.48.0-6.15.0] or uninstalled, leaving only versions: 5.48.0-6.15.0
 │ └─Adapt [79e6a3ab] log:
 │ ├─possible versions are: 0.3.0-3.3.3 or uninstalled
 │ └─restricted to versions 3.3.3 by an explicit requirement, leaving only versions 3.3.3
 └─restricted by compatibility requirements with LineSearches [d3d80556] to versions: uninstalled — no versions left
   └─LineSearches [d3d80556] log:
     ├─possible versions are: 7.0.0-7.1.1 or uninstalled
     └─restricted by compatibility requirements with NaNMath [77ba4419] to versions: uninstalled
       └─NaNMath [77ba4419] log:
         ├─possible versions are: 0.3.2-1.0.0 or uninstalled
         └─restricted to versions 1.0.0 by an explicit requirement, leaving only versions 1.0.0

```

Done with julia-1.7.3

---

<div class="post-metadata">

### Author: ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)
#### Post date: [June 14, 2022, 6:41am UTC](https://discourse.julialang.org/t/need-help-to-fix-a-pluto-downgrade-when-adding-another-package/82698/2 "2022-06-14T06:41:48Z")

</div>

It was `LineSearches`, and should be solved when [PR #161](https://github.com/JuliaNLSolvers/LineSearches.jl/pull/161) is merged.

_It all makes sense to me now (IIUC):_

The key sentence is “`restricted by compatibility requirements with LineSearches`”.  
In the `compat` section, there is `NaNMath = "0.3"`.

> <https://github.com/JuliaNLSolvers/LineSearches.jl/blob/deb5db05d5aeaa97a218daba963ac3f50422c8c0/Project.toml#L15>

This restriction is incompatible with the `NaNMath = "1.0.0"` of another package  
(which one it is not said, as there might be several).

---

<div class="post-metadata">

### Author: ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)
#### Post date: [August 3, 2022, 4:30pm UTC](https://discourse.julialang.org/t/need-help-to-fix-a-pluto-downgrade-when-adding-another-package/82698/3 "2022-08-03T16:30:26Z")

</div>

It has been reported as [Bump NaNMath · Issue #158 · JuliaNLSolvers/LineSearches.jl · GitHub](https://github.com/JuliaNLSolvers/LineSearches.jl/issues/158).  
In order to help reviewing [Changed Julia to v1.6 and NaNMath to v1 by truedichotomy · Pull Request #161 · JuliaNLSolvers/LineSearches.jl · GitHub](https://github.com/JuliaNLSolvers/LineSearches.jl/pull/161),  
I just prepared a [switch to github CI](https://github.com/JuliaNLSolvers/LineSearches.jl/pull/163) (since appveyor is broken),  
but “First-time contributors need a maintainer to approve running workflows”.  
Could someone with access please unlock this ?
