rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
280 stars 41 forks source link

Remove deprecated Vararg usage #469

Closed sethaxen closed 1 year ago

sethaxen commented 1 year ago

On main, if we load the package using julia --depwarn=yes, we get 50 deprecation warnings reading:

WARNING: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).

Running with --depwarn=error, we can pinpoint that the problem seems to be the syntax Vararg{<:T}. It seems instead one should use Vararg{T}. Similarly, Tuple{<:T,Vararg{<:T}} is apparently unnecessary. e.g.

julia> (1, 2) isa Tuple{Integer,Vararg{Integer}}
true

julia> (Int32(1), false) isa Tuple{Integer,Vararg{Integer}}
true

This PR removes all problematic lines, so that no more of these deprecation warnings are made.

rafaqz commented 1 year ago

Thanks