Skip to content

Cannot precompile on latest Julia master: no method matching length(::Nothing) #1920

@alhirzel

Description

@alhirzel

See: JuliaLang/julia#49171

Jameson Nash believes there may be an issue with traits/generated functions. This results in the following error on latest Julia master when precompiling OrdinaryDiffEq:

ERROR: LoadError: MethodError: no method matching length(::Nothing)

Closest candidates are:
  length(::Union{Base.KeySet, Base.ValueIterator})
   @ Base abstractdict.jl:58
  length(::Union{ArrayInterface.BidiagonalIndex, ArrayInterface.TridiagonalIndex})
   @ ArrayInterface ~/prj/20230327_bisect_julia/depot/packages/ArrayInterface/xqHUD/src/ArrayInterface.jl:804
  length(::Union{Tables.AbstractColumns, Tables.AbstractRow})
   @ Tables ~/prj/20230327_bisect_julia/depot/packages/Tables/AcRIE/src/Tables.jl:180
  ...

Stacktrace:
  [1] _similar_shape(itr::Nothing, ::Base.HasLength)
    @ Base ./array.jl:658
  [2] _array_for(::Type{Core.MethodInstance}, itr::Nothing, isz::Base.HasLength)
    @ Base ./array.jl:674
  [3] _method_instances(f_type::Any, t_type::Any)
    @ Tricks ~/prj/20230327_bisect_julia/depot/packages/Tricks/zD0qD/src/Tricks.jl:136
  [4] #s1#1
    @ ~/prj/20230327_bisect_julia/depot/packages/Tricks/zD0qD/src/Tricks.jl:20 [inlined]
  [5] var"#s1#1"(T::Any, ::Any, f::Any, t::Any)
    @ Tricks ./none:0
  [6] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
    @ Core ./boot.jl:600
  [7] promote_f
    @ ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:1081 [inlined]
  [8] get_concrete_problem(prob::SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, OrdinaryDiffEq.var"#lorenz#651", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, isadapt::Bool; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:u0, :p), Tuple{Vector{Float64}, SciMLBase.NullParameters}}})
    @ DiffEqBase ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:1022
  [9] get_concrete_problem
    @ ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:1016 [inlined]
 [10] solve_up(prob::SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, OrdinaryDiffEq.var"#lorenz#651", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, sensealg::Nothing, u0::Vector{Float64}, p::SciMLBase.NullParameters, args::OrdinaryDiffEq.BS3{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ DiffEqBase ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:929
 [11] solve_up
    @ ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:905 [inlined]
 [12] solve(prob::SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, OrdinaryDiffEq.var"#lorenz#651", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, args::OrdinaryDiffEq.BS3{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}; sensealg::Nothing, u0::Nothing, p::Nothing, wrap::Val{true}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ DiffEqBase ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:842
 [13] solve(prob::SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, OrdinaryDiffEq.var"#lorenz#651", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, args::OrdinaryDiffEq.BS3{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False})
    @ DiffEqBase ~/prj/20230327_bisect_julia/depot/packages/DiffEqBase/qPmC2/src/solve.jl:832
 [14] macro expansion
    @ ~/prj/20230327_bisect_julia/depot/packages/OrdinaryDiffEq/FttEX/src/OrdinaryDiffEq.jl:348 [inlined]
 [15] top-level scope
    @ ~/prj/20230327_bisect_julia/depot/packages/SnoopPrecompile/1XXT1/src/SnoopPrecompile.jl:62
 [16] include
    @ ./Base.jl:468 [inlined]
 [17] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2043
 [18] top-level scope
    @ stdin:2
in expression starting at /home/alhirzel/prj/20230327_bisect_julia/depot/packages/OrdinaryDiffEq/FttEX/src/OrdinaryDiffEq.jl:1
in expression starting at stdin:2
ERROR: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to "depot/compiled/v1.10/OrdinaryDiffEq/jl_2EajZX".
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:2293
 [3] compilecache
   @ ./loading.jl:2160 [inlined]
 [4] _require(pkg::Base.PkgId, env::String)
   @ Base ./loading.jl:1804
 [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
   @ Base ./loading.jl:1658
 [6] macro expansion
   @ ./loading.jl:1644 [inlined]
 [7] macro expansion
   @ ./lock.jl:267 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1607

My version info is below. Happy to help debug the issue.

Status `~/prj/20230327_bisect_julia/depot/environments/v1.10/Project.toml`
  [1dea7af3] OrdinaryDiffEq v6.49.4

Julia Version 1.10.0-DEV.873
Commit dc3953db43* (2023-03-24 13:56 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 24 × AMD Ryzen 9 5900X 12-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
  Threads: 1 on 24 virtual cores
Environment:
  JULIA_DEPOT_PATH = depot
  JULIA_EDITOR = nvim
Status `~/prj/20230327_bisect_julia/depot/environments/v1.10/Project.toml`
  [1dea7af3] OrdinaryDiffEq v6.49.4

Julia Version 1.10.0-DEV.873
Commit dc3953db43* (2023-03-24 13:56 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 24 × AMD Ryzen 9 5900X 12-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
  Threads: 1 on 24 virtual cores
Environment:
  JULIA_DEPOT_PATH = depot
  JULIA_EDITOR = nvim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions