Skip to content

New method ambiguity on Julia v1.11 #108

@sethaxen

Description

@sethaxen

On Julia v1.11-rc3, there's a new ambiguity in the method for write that is not present on v1.10.5:

julia> using Aqua, ZipFile

julia> Aqua.test_ambiguities(ZipFile)
1 ambiguities found. To get a list, set `broken = false`.
Ambiguity #1
write(w::ZipFile.Zlib.Writer, a::SubArray{T, N, A}) where {T, N, A<:Array} @ ZipFile.Zlib ~/.julia/packages/ZipFile/yQ7yx/src/Zlib.jl:169
write(s::IO, A::StridedArray) @ Base io.jl:833

Possible fix, define
  write(::ZipFile.Zlib.Writer, ::SubArray{T, N, A, I} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, AbstractRange{<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8}}, Base.ReshapedArray{T, N, A, Tuple{}} where {T, N, A<:AbstractUnitRange}, Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8}}}) where {T, N, A<:Array}

Skipping ZipFile.Zlib.compress
Skipping ZipFile.Zlib.decompress
Test Failed at /home/sethaxen/.julia/packages/Aqua/tHrmY/src/ambiguities.jl:78
  Expression: iszero(num_ambiguities)

ERROR: There was an error during testing

Version info

julia> versioninfo()
Julia Version 1.11.0-rc3
Commit 616e45539db (2024-08-26 15:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, tigerlake)
Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)
Environment:
  JULIA_NUM_THREADS = auto
  JULIA_EDITOR = code

julia> using Pkg; Pkg.status()
Status `/tmp/jl_E0YQla/Project.toml`
  [4c88cf16] Aqua v0.8.7
  [a5390f91] ZipFile v0.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions