-
Notifications
You must be signed in to change notification settings - Fork 624
Cleaning up unnecessary use of "@hide annotations" (b/177448055) #2544
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
Conversation
Coverage ReportAffected SDKsNo changes between base commit (39ce055) and head commit (31b0513b). Test Logs
NotesHTML coverage reports can be produced locally with Head commit (31b0513b) is created by Prow via merging commits: 39ce055 cdaa292. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (31b0513b) is created by Prow via merging commits: 39ce055 cdaa292. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed PR description, which makes my review very easy! I recently merged FirebasePerformanceInitializer.java
and AppStateMonitor.java
, could you do a sanity check there?
Merge this PR after #2545. Reason: #2546 (comment) |
/test smoke-tests |
Few Points:
We should be using
@hide
javadoc annotation to hide certain packages/classes/methods (which are declared public) to be considered a part of public API.Double use of
@hide
javadoc annotation is not required. This was a requirement with GmsCore (go/gmscore-hide-annotation-lsc). Also that second annotation was@Hide
Java annotation (which is a GmsCore annotation) and not@hide
javadoc annotation (which is a general javadoc annotation) which seems like happened during code migration to GitHub.This annotation should only be used in public classes/methods.
Adding this annotation to the method will hide that method.
Adding this annotation to the class level will hide the entire class and its public methods.
Adding this annotation to the package declaration in the
package-info.java
class makes the entire classes within that package to be hidden. Note that this does not work transitively for child packages and so each child package would also need there ownpackage-info.java
class.There's no way currently to not hide some of the classes/methods when the entire package is marked hidden. So in that case where a package contains some classes/methods which has to be public than we have to apply this annotation class/method wise.
What does
hiding
means?FAQs
No, I have already validated everything by running the below command and no change was detected (caveat: sometimes you have to touch the
api.txt
file to trigger the run).WANT_LGTM = @vkryachko