andreasvarga / DescriptorSystems.jl

Manipulation of generalized state-space (descriptor) system representations using Julia
MIT License
24 stars 3 forks source link

Type piracy issues #18

Open andreasvarga opened 7 months ago

andreasvarga commented 7 months ago

I am facing the following type piracy issue when testing with Aqua:

julia> using DescriptorSystems

julia> using Aqua

julia> Aqua.test_piracies(DescriptorSystems)
Possible type-piracy detected:
[1] hcat(A::Union{Number, DescriptorStateSpace, LinearAlgebra.UniformScaling, AbstractVecOrMat}...) @ DescriptorSystems C:\Users\Andreas\Documents\software\Julia\DescriptorSystems.jl\src\connections.jl:220
[2] hvcat(rows::Tuple{Vararg{Int64}}, A::Union{Number, DescriptorStateSpace, LinearAlgebra.UniformScaling, AbstractVecOrMat}...) @ DescriptorSystems C:\Users\Andreas\Documents\software\Julia\DescriptorSystems.jl\src\connections.jl:260
[3] vcat(A::Union{Number, DescriptorStateSpace, LinearAlgebra.UniformScaling, AbstractVecOrMat}...) @ DescriptorSystems C:\Users\Andreas\Documents\software\Julia\DescriptorSystems.jl\src\connections.jl:220
Test Failed at C:\Users\Andreas\.julia\packages\Aqua\9p8ck\src\piracies.jl:232
  Expression: isempty(v)
   Evaluated: isempty(Method[hcat(A::Union{Number, DescriptorStateSpace, LinearAlgebra.UniformScaling, AbstractVecOrMat}...) @ DescriptorSystems C:\Users\Andreas\Documents\software\Julia\DescriptorSystems.jl\src\connections.jl:220, hvcat(rows::Tuple{Vararg{Int64}}, A::Union{Number, DescriptorStateSpace, LinearAlgebra.UniformScaling, AbstractVecOrMat}...) @ DescriptorSystems C:\Users\Andreas\Documents\software\Julia\DescriptorSystems.jl\src\connections.jl:260, vcat(A::Union{Number, DescriptorStateSpace, LinearAlgebra.UniformScaling, AbstractVecOrMat}...) @ DescriptorSystems C:\Users\Andreas\Documents\software\Julia\DescriptorSystems.jl\src\connections.jl:220])

ERROR: There was an error during testing

The implementation of hcat, vcat and hvcat operations on the DescriptorStateSpace structure should be similar to that employed in the LinearMaps package, which is apparently fully Aqua compliant. I wonder how this compliance can be enforced also for this package. Any help is welcome @dkarrasch.

dkarrasch commented 7 months ago

To be honest, LinearMaps.jl is not fully compliant. The type piracy check is broken, see

https://github.com/JuliaLinearAlgebra/LinearMaps.jl/blob/master/test/runtests.jl

for how to "fix" this.