Why does Distances 0.9.0 depends on Plots 1.5.7

I dont understand why the package Distances which calculates euclidean distances would depends on Plot 1.5.7
I could not figure out what in Plots 1.5.8 broke Distances 0.9.0

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Installed Plots ─ v1.5.8
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↓ Distances v0.9.0 ⇒ v0.8.2
  [b8a86587] ↓ NearestNeighbors v0.4.6 ⇒ v0.4.4
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
   Building Plots → `~/.julia/packages/Plots/ViMfq/deps/build.log`

Distances does not depend on Plots at all: Project.toml

I just tried investigating this and indeed Distances 0.8.2 got installed when I ]add-ed it (I had Plots 1.5.8 already installed in my global environment). However ]add Distances@0.9 worked without problems - here’s my current environment:

(@v1.4) pkg> st
Status `~/.julia/environments/v1.4/Project.toml`
  [c52e3926] Atom v0.12.19
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.6.2
  [a93c6f00] DataFrames v0.21.6
  [b4f34e82] Distances v0.9.0
  [31c24e10] Distributions v0.23.8
  [38e38edf] GLM v1.3.10
  [e5e0dc1b] Juno v0.8.3
  [1914dd2f] MacroTools v0.5.5
  [ff71e718] MixedModels v2.3.0
  [429524aa] Optim v0.22.0
  [91a5bcdd] Plots v1.5.8

So I’m not sure why the resolver didn’t pick 0.9 in the first place?

This kinda looks like https://github.com/JuliaLang/Pkg.jl/issues/1949. I have no idea why that happens though.

I couldn’t reproduce this in an empty environment:

(@TestResolver) pkg> st
Status `~/.julia/environments/TestResolver/Project.toml`
  [b4f34e82] Distances v0.9.0
  [b8a86587] NearestNeighbors v0.4.6
  [91a5bcdd] Plots v1.5.7

(@TestResolver) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating `~/.julia/environments/TestResolver/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/TestResolver/Manifest.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8

Also, I tried to repro @nilshg case:

(@TestResolver) pkg> st
Status `~/.julia/environments/TestResolver/Project.toml`
  [c52e3926] Atom v0.12.19
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.6.2
  [a93c6f00] DataFrames v0.21.6
  [31c24e10] Distributions v0.23.8
  [38e38edf] GLM v1.3.10
  [e5e0dc1b] Juno v0.8.3
  [1914dd2f] MacroTools v0.5.5
  [ff71e718] MixedModels v2.3.0
  [429524aa] Optim v0.22.0
  [91a5bcdd] Plots v1.5.8

(@TestResolver) pkg> add Distances
  Resolving package versions...
Updating `~/.julia/environments/TestResolver/Project.toml`
  [b4f34e82] + Distances v0.9.0
No Changes to `~/.julia/environments/TestResolver/Manifest.toml`

so for me, it installs the latest Distances.

It’s really helpful to provide full Project + Manifest file in cases like this because it makes it much easier to set up the same state locally to debug.

1 Like

Not at my home machine anymore, but will try to remember to provide Project and Manifest when I’m back home - I truncated the st output above at Plots, there are a few Stats... packages missing.

Nevermind, actually it turns out I can reproduce it on my work machine as well, will DM you the full output.

@StevenSiew, it would be interesting if you could rerun your test but first set ENV["JULIA_PKGRESOLVE_ACCURACY"] = 2 (and maybe try higher number).

Here is the result

julia> ENV["JULIA_PKGRESOLVE_ACCURACY"] = 2
2

(@v1.5) pkg> free Plots
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↓ Distances v0.9.0 ⇒ v0.8.2
  [b8a86587] ↓ NearestNeighbors v0.4.6 ⇒ v0.4.4
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8

(@v1.5) pkg> add Plots@1.5.7
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7

(@v1.5) pkg> pin Plots
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
No Changes to `~/.julia/environments/v1.5/Project.toml`
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↑ Distances v0.8.2 ⇒ v0.9.0
  [b8a86587] ↑ NearestNeighbors v0.4.4 ⇒ v0.4.6

julia> ENV["JULIA_PKGRESOLVE_ACCURACY"] = 4
4

(@v1.5) pkg> free Plots
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↓ Distances v0.9.0 ⇒ v0.8.2
  [b8a86587] ↓ NearestNeighbors v0.4.6 ⇒ v0.4.4
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8

(@v1.5) pkg> add Plots@1.5.7
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7

(@v1.5) pkg> pin Plots
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
No Changes to `~/.julia/environments/v1.5/Project.toml`
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↑ Distances v0.8.2 ⇒ v0.9.0
  [b8a86587] ↑ NearestNeighbors v0.4.4 ⇒ v0.4.6

julia> ENV["JULIA_PKGRESOLVE_ACCURACY"] = 8
8

(@v1.5) pkg> free Plots
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↓ Distances v0.9.0 ⇒ v0.8.2
  [b8a86587] ↓ NearestNeighbors v0.4.6 ⇒ v0.4.4
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8

(@v1.5) pkg> add Plots@1.5.7
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7

(@v1.5) pkg> pin Plots
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
No Changes to `~/.julia/environments/v1.5/Project.toml`
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↑ Distances v0.8.2 ⇒ v0.9.0
  [b8a86587] ↑ NearestNeighbors v0.4.4 ⇒ v0.4.6

julia> ENV["JULIA_PKGRESOLVE_ACCURACY"] = 16
16

(@v1.5) pkg> free Plots
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↓ Distances v0.9.0 ⇒ v0.8.2
  [b8a86587] ↓ NearestNeighbors v0.4.6 ⇒ v0.4.4
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8

(@v1.5) pkg> add Plots@1.5.7
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7

(@v1.5) pkg> pin Plots
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
No Changes to `~/.julia/environments/v1.5/Project.toml`
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↑ Distances v0.8.2 ⇒ v0.9.0
  [b8a86587] ↑ NearestNeighbors v0.4.4 ⇒ v0.4.6

julia> ENV["JULIA_PKGRESOLVE_ACCURACY"] = 64
64

(@v1.5) pkg> free Plots
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⚲ ⇒ v1.5.7

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↓ Distances v0.9.0 ⇒ v0.8.2
  [b8a86587] ↓ NearestNeighbors v0.4.6 ⇒ v0.4.4
  [91a5bcdd] ↑ Plots v1.5.7 ⇒ v1.5.8

(@v1.5) pkg> add Plots@1.5.7
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.8 ⇒ v1.5.7

(@v1.5) pkg> pin Plots
  Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [91a5bcdd] ↓ Plots v1.5.7 ⇒ v1.5.7 ⚲

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
No Changes to `~/.julia/environments/v1.5/Project.toml`
Updating `~/.julia/environments/v1.5/Manifest.toml`
  [b4f34e82] ↑ Distances v0.8.2 ⇒ v0.9.0
  [b8a86587] ↑ NearestNeighbors v0.4.4 ⇒ v0.4.6

(@v1.5) pkg> 

status

(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
  [c52e3926] Atom v0.12.19
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.7.7
  [5ae59095] Colors v0.12.3
  [a93c6f00] DataFrames v0.21.6
  [31c24e10] Distributions v0.23.8 ⚲
  [497a8b3b] DoubleFloats v1.1.13
  [f6369f11] ForwardDiff v0.10.12
  [28b8d3ca] GR v0.51.0
  [cd3eb016] HTTP v0.8.17
  [7073ff75] IJulia v1.21.2
  [c601a237] Interact v0.10.3
  [e5e0dc1b] Juno v0.8.3
  [2fda8390] LsqFit v0.11.0
  [eff96d63] Measurements v2.2.1
  [6fe1bfb0] OffsetArrays v1.1.2
  [429524aa] Optim v0.22.0
  [91a5bcdd] Plots v1.5.7 ⚲
  [c3e4b0f8] Pluto v0.11.4
  [7f904dfe] PlutoUI v0.5.2
  [08abe8d2] PrettyTables v0.9.1
  [d330b81b] PyPlot v2.9.0
  [1a8c2f83] Query v1.0.0
  [efcf1570] Setfield v0.7.0
  [276daf66] SpecialFunctions v0.10.3
  [860ef19b] StableRNGs v0.1.1
  [90137ffa] StaticArrays v0.12.4
  [2913bbd2] StatsBase v0.32.2
  [f3b207a7] StatsPlots v0.14.11
  [bd369af6] Tables v1.0.5
  [b8865327] UnicodePlots v1.2.0
  [0f1e0344] WebIO v0.8.14
  [cc8bc4a8] Widgets v0.6.2

(@v1.5) pkg> 

julia> versioninfo()
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i7 CPU         870  @ 2.93GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, nehalem)
Environment:
  JULIA_NUM_THREADS = 8
  JULIA_PKGRESOLVE_ACCURACY = 64