Skip to content
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

feat: export protobuf separately, avoid loading gRPC unless needed #1326

Merged
merged 6 commits into from
Aug 26, 2022

Conversation

alexander-fenster
Copy link
Contributor

@alexander-fenster alexander-fenster commented Aug 26, 2022

This PR contains a set of small fixes and new exports that will allow client libraries load just the REST version of google-gax, without auto-loading gRPC. The first library that will immediately benefit from this is Firestore.

@alexander-fenster alexander-fenster requested a review from a team as a code owner August 26, 2022 00:06
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Aug 26, 2022
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: xs Pull request size is extra small. labels Aug 26, 2022
@alexander-fenster alexander-fenster changed the title fix: make fallback export more stuff feat: export protobuf separately, avoid loading gRPC unless needed Aug 26, 2022
@alexander-fenster alexander-fenster merged commit 424df8e into main Aug 26, 2022
@alexander-fenster alexander-fenster deleted the export-things-fallback branch August 26, 2022 15:58
@timdp
Copy link

timdp commented Aug 30, 2022

@alexander-fenster This seems like an interesting addition, but as a result, I'm no longer able to bundle @google-cloud/logging-min, which depends on this package, using esbuild. The reason is that build/protos/protos.js contains:

require("google-gax/build/src/protobuf")

which makes the latest version of esbuild crash with:

Could not resolve "google-gax/build/src/protobuf"

and indeed, node_modules/google-gax/build/src/protobuf.js isn't there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants