`StatsBase` restricted from upgrading due to compatability constraints

I noticed that StatsBase received a version bump to 0.34.0 from 0.33.21 (was earlier from 0.33.22). I tried to update all of my packages to the latest release, but StatsBase didn’t get updated. Here’s my ]st after updating:

(@v1.8) pkg> st
Status `C:\Users\user\.julia\environments\v1.8\Project.toml`
  [6e4b80f9] BenchmarkTools v1.3.2
  [336ed68f] CSV v0.10.9
  [5ae59095] Colors v0.12.10
  [a93c6f00] DataFrames v1.5.0
  [31c24e10] Distributions v0.25.88
  [e30172f5] Documenter v0.27.24
  [38e38edf] GLM v1.8.2
  [09f84164] HypothesisTests v0.10.11
  [7073ff75] IJulia v1.24.0
  [ae8d54c2] Luxor v3.7.0
  [ee78f7c6] Makie v0.19.4
  [14b8a8f1] PkgTemplates v0.7.34
  [91a5bcdd] Plots v1.38.10
  [860ef19b] StableRNGs v1.0.0
  [82ae8749] StatsAPI v1.6.0
⌅ [2913bbd2] StatsBase v0.33.21
  [f3b207a7] StatsPlots v0.15.4
  [c1a98b4d] Survey v0.2.0
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
  [10745b16] Statistics
  [8dfed614] Test
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`

Upon running status --outdated, I found:

(@v1.8) pkg> status --outdated
Status `C:\Users\user\.julia\environments\v1.8\Project.toml`
⌅ [2913bbd2] StatsBase v0.33.21 (<v0.34.0): AlgebraOfGraphics, Clustering, GLM, HypothesisTests, KernelDensity, Makie, MultivariateStats, Plots, StatsPlots, Survey

I tried to force install StatsBase v0.34.0 and there I came across the following error:

(@v1.8) pkg> add StatsBase@0.34.0
    Updating registry at `C:\Users\user\.julia\registries\General.toml`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package StatsBase [2913bbd2]:
 StatsBase [2913bbd2] log:
 ├─possible versions are: 0.24.0-0.34.0 or uninstalled
 ├─restricted to versions 0.34.0 by an explicit requirement, leaving only versions 0.34.0
 └─restricted by compatibility requirements with HypothesisTests [09f84164] to versions: 0.24.0-0.33.21 — no versions left
   └─HypothesisTests [09f84164] log:
     ├─possible versions are: 0.7.0-0.10.11 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.7.0-0.10.11

I cannot understand now why us this happening as according to latest releases, I have the latest release of HypothesisTests. Am I missing something trivial here?

Some help would be great…

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, tigerlake)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =
2 Likes

I would have thought this is a rare case of a clear resolver message :slight_smile:

StatsBase [2913bbd2] log:
 ├─possible versions are: 0.24.0-0.34.0 or uninstalled
 ├─restricted to versions 0.34.0 by an explicit requirement, leaving only versions 0.34.0
 └─restricted by compatibility requirements with HypothesisTests [09f84164] to versions: 0.24.0-0.33.21 

HypothesisTests restricts compatibility with StatsBase to version 0.33, so you can’t have HypothesisTests and StatsBase@0.34 in the same environment. 0.34 just came out and is a breaking release, so it’ll take some time for all dependents to check they’re okay with the breaking changes in StatsBase and update their compat bounds.

1 Like

So, just for testing, shall I try updating StatsBase after removing HypothesisTests from this environment, and see if that works?

Yes if you need StatsBase 0.34 in your default environment, HypothesisTests has to go.

(generally speaking that’s why you shouldn’t install all your packages in the default environment, but work in project environments instead, although in this case I appreciate that having StatsBase and HypothesisTests in the same environment is quite a common thing)

1 Like

There is now a registration pull request open to update HypothesisTests, so you should be able to install it in like 20 minutes.

The other packages are less under my control, but I’ll have MultivariateStats and KernelDensity updated shortly. I’ve opened a PR against AoG.

StatsBase 0.34 was technically breaking in the sense that certain type aliases were removed that we didn’t expect other packages were using. But beyond that, all functionality from 0.33 should still work, so it should be an easy compat bump for most packages.

1 Like

Looks like I’ll either have to wait till all of the packages in my current environment, which has StatsBase as one of it’s dependencies, get a compat bump or load StatsBase in a different environment, independent of those other packages.

For what it’s worth … there aren’t really any new features in the new release, just a few small fixes. It’s technically breaking because some type aliases were removed.

There was apparently some changes in the treatment of NaNs and Infs for weights.