grpc-web: Separate libraries per proto file (even though one imports the other)?

52 views
Skip to first unread message

Berco Beute

unread,
Apr 5, 2020, 11:10:15 AM4/5/20
to grpc.io
I have a grpc-web question also posted on StackOverflow, but this seems like a better place to post it.
How do I properly generate JS stubs for A.proto that imports B.proto, where there is already a client library generated for B.proto? What I would basically want is that both .proto files have their own generated JS library and I can just install both in a JS project separately. I'm a bit confused since it seems now that I have to compile B.proto files together with B.proto.

(Please see the StackOverflow link if you need a more detailed description)


Stanley Cheung

unread,
Apr 6, 2020, 2:18:03 AM4/6/20
to Berco Beute, grpc.io
This is probably a scenario that's not supported by grpc-web at the moment. You are expected to have to compile B.proto in when you are trying to compile A.proto. There currently is no option to make compiling A.proto aware that there's a separate package for B already. This could be a future enhancement request - please log such request in the grpc/grpc-web repo. Thanks.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/eb884928-4ecc-42dc-8caa-2d706ccc6632%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages