Use a new prost ServiceGenerator finalizer to fix duplicate client and server definitions#147
Use a new prost ServiceGenerator finalizer to fix duplicate client and server definitions#147parasyte wants to merge 9 commits intohyperium:masterfrom
Conversation
- Use a new prost ServiceGenerator finalizer to fix duplicate client and server definitions
|
Ah jeez, failures in cargo-deny and tests that I didn't touch at all... Maybe these will get sorted in master in the meantime and this PR will be fixed by merge or rebase! 😉 |
- Apparently this PR is a breaking change
|
I'm not happy with the new requirement that user code has to include all packages explicitly. Go doesn't have this problem because it will happily pull all packages into scope from a single I don't see an obvious way to auto-include packages within the generated source. The conflict is that imports in protobuf are "file level" and includes in tonic-build are "package level". |
|
I see, this is actually a bug! The client and server modules are being output to the wrong package. I will be addressing this tomorrow. |
|
@parasyte the cargo-deny check is failing in part because of a duplicated version of crossbeam-queue, which is addressed here #145 and in part because you are referencing a different version of prost-build. We'll need #145 to be merged first, or at least the commits that fix the crossbeam duplication and then fix the prost-build issue here |
- Fixes the failing tests
|
Ok, we're good here. All tests are passing, just waiting for |
|
@parasyte I'll look at resolving the issue with cargo-deny shortly, it's affected quite a few of our open PRs right now. |
|
This looks good! Once prost gets a publish out we can merge this! Thanks! |
|
That sounds great. I'll keep the PR as a draft until I can update |
|
Looks like #173 fixes this by namespacing the |
|
@parasyte yup, thank you for this contribution sorry we couldn't get it in, but also looks like prost is a bit slow on upgrading anyways. I am gonna close this as it seems its been solved for you! |
|
I haven't actually used the new code yet, but I am interested in trying it. |
Note: This PR is in draft mode until the dependent PR in
prostis accepted and released: https://github.com/danburkert/prost/pull/241Motivation
Fixes #38
This change allows
tonic-buildto properly group all services from multiple.protofiles into a single package namespace.Solution
Defer code generation to the end of all package processing.