julia
julia copied to clipboard
JET linting error from `wrap` on `Array` (on 1.11)
Seeing this in some PkgEval logs
││││││││┌ string(::String, ::Tuple{Base.OneTo{Int64}}, ::String, ::Tuple{Base.OneTo{Int64}}) @ Base ./strings/io.jl:189
│││││││││┌ print_to_string(::String, ::Tuple{Base.OneTo{Int64}}, ::String, ::Tuple{Base.OneTo{Int64}}) @ Base ./strings/io.jl:150
││││││││││┌ _unsafe_take!(io::IOBuffer) @ Base ./iobuffer.jl:504
│││││││││││┌ wrap(::Type{Array}, m::MemoryRef{UInt8}, l::Int64) @ Base ./array.jl:3099
││││││││││││ failed to optimize due to recursion: Base.wrap(::Type{Array}, ::MemoryRef{UInt8}, ::Int64)
Nut sure if it is benign. cc @aviatesk
See for example https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/cf4f1ba_vs_edb3c92/NonuniformFFTs.primary.log
wrap doesn't exist any more: #53896
https://github.com/JuliaLang/julia/issues/54768#issuecomment-2178056596
Reduced to:
ulia> report_opt(string, (String,Tuple{Base.OneTo{Int}},String,Tuple{Base.OneTo{Int}}))
═════ 4 possible errors found ═════
┌ string(::String, ::Tuple{Base.OneTo{Int64}}, ::String, ::Tuple{Base.OneTo{Int64}}) @ Base ./strings/io.jl:189
│┌ print_to_string(::String, ::Tuple{Base.OneTo{Int64}}, ::String, ::Tuple{Base.OneTo{Int64}}) @ Base ./strings/io.jl:150
││┌ _unsafe_take!(io::IOBuffer) @ Base ./iobuffer.jl:504
│││┌ wrap(::Type{Array}, m::MemoryRef{UInt8}, l::Int64) @ Base ./array.jl:3099
││││ failed to optimize due to recursion: Base.wrap(::Type{Array}, ::MemoryRef{UInt8}, ::Int64)
│││└────────────────────
││┌ print_to_string(::String, ::Int64, ::String, ::Vararg{Any}) @ Base ./strings/io.jl:143
│││ runtime dispatch detected: Base._str_sizehint(%17::Any)::Int64
││└────────────────────
││┌ print_to_string(::String, ::Int64, ::String, ::Vararg{Any}) @ Base ./strings/io.jl:148
│││ runtime dispatch detected: print(%59::IOBuffer, %97::Any)::Any
││└────────────────────
││┌ string(::String, ::Int64, ::String, ::Tuple{Int64}, ::String, ::Int64, ::String, ::Int64, ::String) @ Base ./strings/io.jl:189
│││ failed to optimize due to recursion: string(::String, ::Int64, ::String, ::Tuple{Int64}, ::String, ::Int64, ::String, ::Int64, ::String)
││└────────────────────
I will look into it tomorrow.