-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Non-public types should have @API(Internal) #685
Comments
Our original intent was to mark classes that are visible to third-party code (i.e. classes declared as |
That sounds like a great clarification to the API usage and can certainly be codified into the API tools. If you take a look at If it's marked as experimental because it's not finished yet, that's more of a status than a usage. In any case, I should have some tools ready to try out on the API annotations by mid-March. Thanks for helping me better understand what the API tools should be reporting! |
I think it's marked as experimental by mistake. Maybe it was public during development and the annotation was simply forgotten when the public keyword was removed. Having an API tool check for such illegal usage patterns would be great... 😉 Edit: I replaced "default" with "mistake" in the first sentence. |
This seems done with the 5.0.0/1.0.0 releases? |
Yes, I've opened apiguardian-team/apiguardian#2 to create a validation check for non-public types/methods. |
Overview
The javadocs for @API states:
It occurs to me that a public class with only non-public constructors is effectively internal whether or not the API annotation says so. Classes in this state could however have public static members with API annotations that are not internal-only.
Clarifying the precise rules for the API annotations use is important for the completion of #144 (which I intend to return to when I'm done with #343). One additional question is whether
@API(Internal)
types should show up in the "developer javadocs" (#676).There are currently classes with package access-levels that are marked as
@API(Experimental)
- I've mostly noticed them in theorg.junit.jupiter.engine.discovery
package:JavaElementsResolver
MethodFinder
TestContainerResolver
TestFactoryMethodResolver
TestMethodResolver
Deliverables
@API
usage.@API(Internal)
The text was updated successfully, but these errors were encountered: