Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Allow optional fields in argument structs #85

Open
Raynos opened this issue Nov 1, 2015 · 0 comments
Open

Allow optional fields in argument structs #85

Raynos opened this issue Nov 1, 2015 · 0 comments

Comments

@Raynos
Copy link
Contributor

Raynos commented Nov 1, 2015

$ 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.

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

No branches or pull requests

1 participant