You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The julia docu explains some scenario, where one would have a good reason to do type piracy, e. g. when splitting a C wrapper into a lightweight jll defining the types and another julia package implementing higher level functionality, see https://docs.julialang.org/en/v1/manual/style-guide/#Avoid-type-piracy-1 (last paragraph).
I would thus propose to add a kwarg to the piracy test with a list of types that should be treated as own types even if they are foreign.
Most other Aqua test cases have some kind of ignore kwarg, so I see no point in not having something similar for test_piracy.
The text was updated successfully, but these errors were encountered:
It would also be useful to be able to specify that a function is owned by a different package: For instance, StatsAPI defines function stumps that are officially declared to be owned by StatsBase - but currently Aqua flags their default implementation for generic types (defined in Base) as type piracy (JuliaStats/StatsBase.jl#866).
So a solution to you would be to split up my proposed kwarg treat_as_own into two different ones: one for types that works as proposed in #140, and one for functions, which just doesn't check type piracy for the functions given there.
Is that what you have in mind?
And I would like to hear the opinion of @fingolfin on this - If there is nothing I have missed, I will update my pr #140 to include your idea as well.
Originally brought up in oscar-system/GAP.jl#889 (comment).
The julia docu explains some scenario, where one would have a good reason to do type piracy, e. g. when splitting a C wrapper into a lightweight jll defining the types and another julia package implementing higher level functionality, see https://docs.julialang.org/en/v1/manual/style-guide/#Avoid-type-piracy-1 (last paragraph).
I would thus propose to add a kwarg to the piracy test with a list of types that should be treated as own types even if they are foreign.
Most other Aqua test cases have some kind of
ignore
kwarg, so I see no point in not having something similar fortest_piracy
.The text was updated successfully, but these errors were encountered: