Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Add ability to suppress unwanted autogenerated code for clients that use the gapic as a implementation detail #2742

Closed
igorbernstein2 opened this issue Apr 29, 2019 · 4 comments
Assignees
Labels
lang: java Issues specific to Java. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@igorbernstein2
Copy link
Contributor

Cloud Bigtable's client API differs from it's protocol. So it requires a manual wrapper and uses GAPIC as an internal implementation detail. Unfortunately this means that the underlying gapic api is exposed alongside the intended api. This is not only confusing to customers, but also forces the client developers to keep the gapic surface stable. To avoid this issue I'm currently using synth.py script to mutate the autogenerated to hide it:
googleapis/google-cloud-java#5035

It would be nice if there was a way to do this without this hack

@igorbernstein2 igorbernstein2 added lang: java Issues specific to Java. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 29, 2019
@eoogbe eoogbe added the priority: p3 Desirable enhancement or fix. May not be included in next release. label May 13, 2019
@andreamlin
Copy link
Contributor

@igorbernstein2 Which generated entities is this referring to, specifically?

@igorbernstein2
Copy link
Contributor Author

I would love to be able to exclude the auto generated clients (leaving behind only the stubs).
Also would be great to make the callable factories package private.
You can find a full list of files that I'm removing here:
https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-clients/google-cloud-bigtable/synth.py

@andreamlin andreamlin assigned yihanzhen and unassigned andreamlin Jun 14, 2019
@igorbernstein2
Copy link
Contributor Author

Also related: it would be nice for gapic to generate a GrpcBaseStub. That exposes the base callables w/o retries. This would allow manually written clients avoid unnecessary links in the callable chains

@yihanzhen yihanzhen removed their assignment Apr 10, 2020
@igorbernstein2
Copy link
Contributor Author

I was able to address the GrpcBaseStub need in gax:
googleapis/gax-java#891

And I don't think it will be possible to disable generation of clients as they have a circulat dependency with the stubs.

So I'm going to close this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang: java Issues specific to Java. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants