-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bigtable: clean up the public surface #5034
Bigtable: clean up the public surface #5034
Conversation
* Exclude autogenerated files that aren't used * Internal implementation details are now package private * Internal implementation details that are needed by other pacakges are now @internalapi (ie. pagination wrappers in Client) * package-info.java not document the public surface instead of the autogen one * EnhancedBigtableStubSetting are now public api * synth.py is responsible for the transformations
Can/should this be done on the proto level instead? |
I don’t know of a way. Do you have a recommendation? |
Mockito can't mock classes which have package-private parents
Updated PR to only mark things as |
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.
Ideally any search/replacing we do with synthtool is temporary and can be fixed upstream in the Gapic generator. Perhaps we need another annotation/config for marking a class as internal api in the Gapic generator. Relying on finding the internal api comment is bound to fail at some point.
* </code> | ||
* </pre> | ||
*/ | ||
@Generated("by gapic-generator") |
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.
Should we preserve this annotation so we mark the class as generated.
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.
I was debating this myself. As far as I know nothing uses that annotation and I decided to keep it simple until its needed. If you feel strongly, I can try to retain it
Codecov Report
@@ Coverage Diff @@
## master #5034 +/- ##
============================================
+ Coverage 50.33% 50.33% +<.01%
+ Complexity 23676 23662 -14
============================================
Files 2238 2236 -2
Lines 226057 225941 -116
Branches 24961 24954 -7
============================================
- Hits 113775 113728 -47
+ Misses 103678 103613 -65
+ Partials 8604 8600 -4
Continue to review full report at Codecov.
|
As discussed offline:
|
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.
Add a link to the feature request in the gapic generator. Otherwise LGTM.
s.copy(admin_library / 'grpc-google-cloud-bigtable-admin-v2/src', '../../google-api-grpc/grpc-google-cloud-bigtable-admin-v2/src') | ||
s.copy(admin_library / 'proto-google-cloud-bigtable-admin-v2/src', '../../google-api-grpc/proto-google-cloud-bigtable-admin-v2/src') | ||
# Replace javadoc and annotations before every public class with InternalApi | ||
# javadoc and annotation |
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.
Can you add the link to the feature request issue for the gapic generator?
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.
It's at the top of the file
Internal implementation details are now package private