This repository was archived by the owner on Sep 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Allow optional fields in argument structsΒ #85
Copy link
Copy link
Open
Description
$ node benchmarks/tchan-server.js --port 9000 --host 127.0.0.1
assert.js:92
throw new assert.AssertionError({
^
AssertionError: no field of an argument struct may be marked optional including targetLocation of bootstrapEater_args
at ThriftStruct.link (/home/raynos/uber/marketplace-gateway/node_modules/tchannel/node_modules/thriftrw/struct.js:167:20)
at Thrift.link (/home/raynos/uber/marketplace-gateway/node_modules/tchannel/node_modules/thriftrw/thrift.js:208:32)
at new Thrift (/home/raynos/uber/marketplace-gateway/node_modules/tchannel/node_modules/thriftrw/thrift.js:73:10)
at new TChannelAsThrift (/home/raynos/uber/marketplace-gateway/node_modules/tchannel/as/thrift.js:49:17)
at TChannelAsThrift (/home/raynos/uber/marketplace-gateway/node_modules/tchannel/as/thrift.js:39:16)
at new BenchServer (/home/raynos/uber/marketplace-gateway/benchmarks/tchan-server.js:30:39)
at main (/home/raynos/uber/marketplace-gateway/benchmarks/tchan-server.js:167:18)
at Object.<anonymous> (/home/raynos/uber/marketplace-gateway/benchmarks/tchan-server.js:162:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
We spoke a while back about the semantics of arguments structs and believe we came to the conclusion that an arguments struct should be the same as any other struct.
It would be nice to remove this limitation, it would make porting existing HTTP/JSON interfaces to thrift easier since existing HTTP/JSON interfaces can have empty bodies and with optional fields on the main body.
hlin117
Metadata
Metadata
Assignees
Labels
No labels