You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We were renaming some of our Protobuf messages to conform to the naming guidelines, ie. FooRequest and FooResponse, but it broke dependent libraries, even though we had included duplicate message declarations with the old names. This was because the generated JavaScript code checks the instance of the message that gets passed in:
I understand why that check was added, and it makes a lot of sense in JavaScript. For us, we use protoc-gen-ts to give us type-checking at build time, so the check just gets in the way of migrating to the correct message names, since protobuf and gRPC don't actually care about the message names.
Describe the solution you'd like
For ease of migration, I wish there was a way to omit the instanceof check in the generated JS code. Perhaps an additional flag: when the flag is set, the relevant lines get omitted from the generated code.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We were renaming some of our Protobuf messages to conform to the naming guidelines, ie.
FooRequest
andFooResponse
, but it broke dependent libraries, even though we had included duplicate message declarations with the old names. This was because the generated JavaScript code checks the instance of the message that gets passed in:https://github.com/grpc/grpc-node/blob/master/packages/grpc-tools/src/node_generator.cc#L132-L137
I understand why that check was added, and it makes a lot of sense in JavaScript. For us, we use
protoc-gen-ts
to give us type-checking at build time, so the check just gets in the way of migrating to the correct message names, since protobuf and gRPC don't actually care about the message names.Describe the solution you'd like
For ease of migration, I wish there was a way to omit the
instanceof
check in the generated JS code. Perhaps an additional flag: when the flag is set, the relevant lines get omitted from the generated code.The text was updated successfully, but these errors were encountered: