-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypePiracy: treat foreign type as own type #138
Comments
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 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. |
Yes, I think such a generalization would fix my use case in StatsBase 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: