Open
Description
Context: I use JET at scale for type stability testing in DifferentiationInterface. Now that Julia 1.12 is available as a beta release, I thought it would be fun to try it out in my CI, and I got lots of new JET runtime dispatch errors, most of which are probably noise?
Here are a few examples, tested on the following settings:
- Old (where there is no error)
julia> using JET
julia> using Pkg; Pkg.pkgversion(JET)
v"0.9.19"
julia> versioninfo()
Julia Version 1.11.4
- New (where the error appears)
julia> using JET
julia> using Pkg; Pkg.pkgversion(JET)
[ Warning: pkgversion is defined in Base and is not public in Pkg
v"0.10.0"
julia> versioninfo()
Julia Version 1.12.0-beta1
I only display errors for the new version.
julia> @report_opt vcat([1], [1])
[ Info: tracking Base
═════ 1 possible error found ═════
┌ vcat(::Vector{Int64}, ::Vector{Int64}) @ Base ./array.jl:2270
│┌ _assert_tostring(msg::Expr) @ Base ./error.jl:249
││ runtime dispatch detected: %1::Any(msg::Expr)::Any
│└────────────────────
julia> using SparseArrays
julia> @report_opt SparseMatrixCSC(ones(2, 2))
┌ Warning: skipping (::Base.var"#show_bound#show##0")(io::IO, b) @ Base show.jl:2805 to avoid parsing too much code
└ @ Revise ~/.julia/packages/Revise/mLfYT/src/packagedef.jl:1163
┌ Warning: skipping (::Base.var"#show_bound#show##0")(io::IO, b) @ Base show.jl:2805 to avoid parsing too much code
└ @ Revise ~/.julia/packages/Revise/mLfYT/src/packagedef.jl:1163
═════ 24 possible errors found ═════
┌ SparseMatrixCSC(M::Matrix{Float64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:760
│┌ sparse(A::Matrix{Float64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:1028
││┌ convert(T::Type{SparseMatrixCSC{Float64}}, m::Matrix{Float64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:980
│││┌ (SparseMatrixCSC{Float64})(M::Matrix{Float64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:885
││││┌ SparseMatrixCSC{Float64, Int64}(M::Matrix{Float64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:919
│││││┌ SparseMatrixCSC(m::Int64, n::Int64, colptr::Vector{Int64}, rowval::Vector{Int64}, nzval::Vector{Float64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:37
││││││┌ sparse_check_Ti(m::Int64, n::Int64, Ti::Type{Int64}) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:135
│││││││┌ (::SparseArrays.var"#throwTi#sparse_check_Ti##0"{Type{Int64}})(str::String, lbl::String, k::Int64) @ SparseArrays /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/SparseArrays/src/sparsematrix.jl:133
││││││││┌ string(::String, ::String, ::String, ::String, ::Int64, ::String, ::Type{Int64}) @ Base ./strings/io.jl:193
│││││││││┌ print_to_string(::String, ::String, ::String, ::String, ::Int64, ::String, ::Type{Int64}) @ Base ./strings/io.jl:151
││││││││││┌ print(io::IOBuffer, x::Type) @ Base ./strings/io.jl:35
│││││││││││┌ show(io::IOBuffer, x::Type) @ Base ./show.jl:970
││││││││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:975
│││││││││││││┌ show_typealias(io::IOBuffer, x::Type) @ Base ./show.jl:812
││││││││││││││┌ make_wheres(io::IOBuffer, env::Core.SimpleVector, x::Type) @ Base ./show.jl:778
│││││││││││││││┌ push!(s::IdSet{Any}, x::TypeVar) @ Base ./idset.jl:52
││││││││││││││││┌ _assert_tostring(msg::Expr) @ Base ./error.jl:249
│││││││││││││││││ runtime dispatch detected: %1::Any(msg::Expr)::Any
││││││││││││││││└────────────────────
│││││││││││││┌ show_typealias(io::IOBuffer, x::Type) @ Base ./show.jl:813
││││││││││││││┌ show_typealias(io::IOBuffer, name::GlobalRef, x::Type, env::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:760
│││││││││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:724
││││││││││││││││┌ show(io::IOContext{IOBuffer}, tv::TypeVar) @ Base ./show.jl:2816
│││││││││││││││││┌ (::Base.var"#show_bound#show##0")(io::IOContext{IOBuffer}, b::Any) @ Base ./show.jl:2808
││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, b::Any)::Any
│││││││││││││││││└────────────────────
│││││││││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:719
││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %277::Any)::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:722
││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %349::Any)::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:727
││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %205::Any)::Any
│││││││││││││││└────────────────────
││││││││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:978
│││││││││││││┌ show_datatype(io::IOBuffer, x::DataType) @ Base ./show.jl:1127
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1130
│││││││││││││││┌ maybe_kws_nt(x::DataType) @ Base ./show.jl:1118
││││││││││││││││ runtime dispatch detected: eltype(%76::DataType)::Any
│││││││││││││││└────────────────────
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1219
│││││││││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:724
││││││││││││││││┌ show(io::IOBuffer, tv::TypeVar) @ Base ./show.jl:2816
│││││││││││││││││┌ (::Base.var"#show_bound#show##0")(io::IOBuffer, b::Any) @ Base ./show.jl:2808
││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, b::Any)::Any
│││││││││││││││││└────────────────────
│││││││││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:719
││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %253::Any)::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:722
││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %313::Any)::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:727
││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %193::Any)::Any
│││││││││││││││└────────────────────
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1190
│││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %227::Any)::Any
││││││││││││││└────────────────────
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1195
│││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %54::Any)::Any
││││││││││││││└────────────────────
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1181
│││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %57::Any)::Any
││││││││││││││└────────────────────
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1183
│││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %54::Any)::Any
││││││││││││││└────────────────────
││││││││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1205
│││││││││││││││ runtime dispatch detected: Base.show_at_namedtuple(io::IOBuffer, %332::Tuple, %331::DataType)::Any
││││││││││││││└────────────────────
││││││││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:981
│││││││││││││┌ show_unionaliases(io::IOBuffer, x::Union) @ Base ./show.jl:914
││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %67::Any)::Any
│││││││││││││└────────────────────
││││││││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:985
│││││││││││││┌ show_delim_array(io::IOBuffer, itr::Vector{Any}, op::Char, delim::Char, cl::Char, delim_one::Bool) @ Base ./show.jl:1411
││││││││││││││┌ show_delim_array(io::IOBuffer, itr::Vector{Any}, op::Char, delim::Char, cl::Char, delim_one::Bool, i1::Int64, l::Int64) @ Base ./show.jl:1422
│││││││││││││││ runtime dispatch detected: show(%3::IOContext{IOBuffer}, %51::Any)::Any
││││││││││││││└────────────────────
││││││││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:1012
│││││││││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1190
││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %264::Any)::Any
│││││││││││││└────────────────────
│││││││││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1195
││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %66::Any)::Any
│││││││││││││└────────────────────
│││││││││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1181
││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %69::Any)::Any
│││││││││││││└────────────────────
│││││││││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1183
││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %66::Any)::Any
│││││││││││││└────────────────────
│││││││││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1205
││││││││││││││ runtime dispatch detected: Base.show_at_namedtuple(io::IOContext{IOBuffer}, %443::Tuple, %442::DataType)::Any
│││││││││││││└────────────────────
│││││││││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1213
││││││││││││││ runtime dispatch detected: Base.show_at_namedtuple(io::IOContext{IOBuffer}, %533::Tuple, %537::DataType)::Any
│││││││││││││└────────────────────
││││││││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:1014
│││││││││││││ runtime dispatch detected: show(%77::IOContext{IOBuffer}, %78::Any)::Any
││││││││││││└────────────────────
Metadata
Metadata
Assignees
Labels
No labels