Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

fallback should use fallback gax always regardless of isBrowser#782

Closed
tofutim wants to merge 1 commit into
googleapis:masterfrom
loqu8:feature/loadProto
Closed

fallback should use fallback gax always regardless of isBrowser#782
tofutim wants to merge 1 commit into
googleapis:masterfrom
loqu8:feature/loadProto

Conversation

@tofutim

@tofutim tofutim commented May 28, 2020

Copy link
Copy Markdown

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a [bug/issue] issue ImageAnnotatorClient does not work inside Electron.js #573
  • Ensure the tests and linter pass (sorry don't know how to do this, but should be ok)
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #573 🐸

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label May 28, 2020
@codecov

codecov Bot commented May 28, 2020

Copy link
Copy Markdown

Codecov Report

Merging #782 into master will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #782      +/-   ##
==========================================
- Coverage   98.38%   98.31%   -0.07%     
==========================================
  Files          15       15              
  Lines       14155    14155              
  Branches      612      612              
==========================================
- Hits        13926    13917       -9     
- Misses        224      233       +9     
  Partials        5        5              
Impacted Files Coverage Δ
src/v1/image_annotator_client.ts 97.86% <100.00%> (ø)
src/v1p1beta1/image_annotator_client.ts 93.68% <0.00%> (-1.85%) ⬇️
src/v1p2beta1/image_annotator_client.ts 95.37% <0.00%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfa6869...60b7d19. Read the comment docs.

@bcoe

bcoe commented May 29, 2020

Copy link
Copy Markdown

@tofutim thanks for the contribution. @alexander-fenster, I believe this change would need to be made int he generator if this is something we want to do?

@alexander-fenster

Copy link
Copy Markdown
Contributor

Yes, this is the right place to do it.

Given that now we have googleapis/gax-nodejs#803 merged, the fix seems valid (we could not do it before since it would've broken the webpack usecase).
I can make this change in the generator so that it applies to all libraries.

Having that said, @tofutim can you give us some details - why would you need that? Is it for Electron?

More details:

  • if you use webpack or similar bundlers, they will respect browser field of google-gax so will go into the fallback mode by default. No need to do it here once more.
  • Electron does not respect browser field, so technically there is a problem with using the libraries in Electron Chromium context. The problem can be avoided by using a bundler (the same webpack) that will do it properly for you.
  • Users might still want to use fallback for non-browser (e.g. Node.js) scenarios.

@alexander-fenster alexander-fenster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right place to make a change, this code is autogenerated. I can make this change in the generator but would love to learn more about your use case.

@alexander-fenster

Copy link
Copy Markdown
Contributor

Taken care of by #793 (that code is auto-generated).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: no This human has *not* signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImageAnnotatorClient does not work inside Electron.js

4 participants