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

Allow null response #1025

Merged
merged 1 commit into from
Jan 23, 2021
Merged

Allow null response #1025

merged 1 commit into from
Jan 23, 2021

Conversation

pro-wh
Copy link
Contributor

@pro-wh pro-wh commented Jan 22, 2021

We're using a custom codec, where null or undefined responses can be represented, and we use that for void methods, similar to how protobuf uses Empty.

This change allows grpc-web to accept responses that decode to null or undefined.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 22, 2021

CLA Signed

The committers are authorized under a signed CLA.

@pro-wh
Copy link
Contributor Author

pro-wh commented Jan 22, 2021

I couldn't build this locally:

$ npm run build

> [email protected] build /home/wh0/work/ekiden/grpc-web/packages/grpc-web
> node scripts/build.js

/home/wh0/work/ekiden/grpc-web/packages/grpc-web/node_modules/.bin/google-closure-compiler --js=exports.js --js=../../javascript --js=../../third_party/closure-library --entry_point=grpc.web.Exports --externs=externs.js --dependency_mode=PRUNE --compilation_level=ADVANCED_OPTIMIZATIONS --generate_exports --export_local_property_definitions --js_output_file=index.js
../../javascript/net/grpc/web/clientreadablestream.js:29: ERROR - [JSC_UNDEFINED_VARIABLE] variable goog is undeclared
goog.module('grpc.web.ClientReadableStream');
^^^^

1 error(s), 0 warning(s)

@pro-wh
Copy link
Contributor Author

pro-wh commented Jan 22, 2021

EasyCLA won't accept my CLA for this. It only seems to apply it to another PR I opened, #1026

@pro-wh
Copy link
Contributor Author

pro-wh commented Jan 22, 2021

they said I should close and reopen to get the bot to notice the CLA. doing that now

@stanley-cheung stanley-cheung merged commit 201c689 into grpc:master Jan 23, 2021
@pro-wh pro-wh deleted the pro-wh/feature/nullish branch January 25, 2021 18:18
@pro-wh pro-wh mentioned this pull request Feb 17, 2021
@pro-wh
Copy link
Contributor Author

pro-wh commented Apr 27, 2022

this turned out not to solve the problem. there are no data events for these payloads at all. opening #1230 as a proposal to add data events for falsy responses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants