JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
621 stars 261 forks source link

Problem with the resolver when bumping stdlib version #3098

Open KristofferC opened 2 years ago

KristofferC commented 2 years ago

In the upcoming 1.6 it is possible to hit the following error (https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/9561ec5_vs_aafae8a/PATHSolver.primary.log)

PkgEval failed: MethodError: no method matching isless(::Int64, ::Nothing)
Closest candidates are:
  isless(::Any, !Matched::Missing) at missing.jl:88
  isless(!Matched::Missing, ::Any) at missing.jl:87
  isless(::Real, !Matched::AbstractFloat) at operators.jl:168
  ...
Stacktrace:
  [1] <(x::Int64, y::Nothing)
    @ Base ./operators.jl:279
  [2] >(x::Nothing, y::Int64)
    @ Base ./operators.jl:305
  [3] greedysolver(graph::Pkg.Resolve.Graph)
    @ Pkg.Resolve /workspace/srcdir/usr/share/julia/stdlib/v1.6/Pkg/src/Resolve/Resolve.jl:293
  [4] resolve(graph::Pkg.Resolve.Graph)
    @ Pkg.Resolve /workspace/srcdir/usr/share/julia/stdlib/v1.6/Pkg/src/Resolve/Resolve.jl:63

This can be reprod by just trying to add PATHSolver on the https://github.com/JuliaLang/julia/pull/45319 branch.

The issue comes from the bump in the stdlib version in https://github.com/JuliaLang/julia/pull/45319/commits/2ccbfe697b732626144b4d59dd75966a0e220e18#diff-3e1bbf7143d0e3a025448928aadf9cf29dbe3975ccdac85125e62843049d9089R3 together with the compat of DataDeps at https://github.com/JuliaRegistries/General/blob/08ac670477f95639640b8881be8548ef7cfdfd69/D/DataDeps/Compat.toml#L33 since changing any of these makes the issue goes away.

However, this indicates there is some issue with the resolver I think since it should either have caught this in an assertion (if the input is inconsistent) or returned a resolved result.

@carlobaldassi, maybe you could look at this?

carlobaldassi commented 2 years ago

Sure, I'll look into it as soon as I can

KristofferC commented 2 years ago

To repro this, you need a registry before https://github.com/JuliaRegistries/General/pull/61849