Commit Graph
11 Commits
Author SHA1 Message Date
James SteeleandLucio Franco b02b4b238b fix(build): Prevent duplicated client/server generated code (#121)
* fix(build): Prevent duplicated client/server generated code

The tonic-build process collects up RPC services as they are provided by
prost, before writing them out as part of the finalization step for a
given protocol buffer package.

In the case of imported protocol buffer packages, there may be RPC
services included by import in addition to those in the top-level
package. Therefore it is necessary to make sure each set of
client/server services gathered by tonic-build is cleared after the
finalization process for a given protocol buffer package, otherwise they
will be incorrectly aggregated as the generation process proceeds
through the subsequent packages.

* Test case for duplicated client/server generated code

A simple test case that will fail to build without a fix to prevent
RPC services being duplicated into inappropriate modules (that related
to particular protocol buffer packages).

* Additional test case for included_service

Introduces an additional case that captures making sure services defined
before including a package with additional services doesn't
incidentially clear such precursor services from the including package.

* Fix unnecessary newline to keep `cargo fmt` happy
2019-11-09 15:45:22 +00:00
Lucio FrancoandGitHub 1dbde95d84 fix(build): Fix service and rpc name conflict (#92)
Closes #89
2019-10-23 15:01:04 -04:00
Lucio Franco ec5778dfa1 Update interop server 2019-09-06 15:37:08 -04:00
Lucio Franco d0cfafafc6 Move codegen to build and remove macros 2019-09-06 15:19:18 -04:00
Lucio Franco 295e7321b9 Add first step of async-trait 2019-09-06 01:30:51 -04:00
Lucio Franco f750dfa111 Fix interoptests and rewrite decode 2019-08-28 17:24:53 -04:00
Lucio Franco 8dc1185a36 Add first pass at interop tests 2019-08-18 21:04:00 -04:00
Lucio Franco 5e208d9da2 First pass at macro 2019-08-15 17:50:25 -04:00
Lucio Franco 0a8aaa8071 Clean up main crate and more work on macro
Signed-off-by: Lucio Franco <[email protected]>
2019-08-15 15:09:54 -04:00
Lucio Franco 404f7d8931 Add tower-h2 and more macro 2019-08-11 13:48:13 -04:00
Lucio Franco b827fdd950 Inital commit 2019-08-09 14:01:27 -04:00