Open xanather opened 1 year ago
Is it possible to get comment on this issue and associated PR? I can expand it via unit tests/any other feedback if the team is open to merging such a feature.
This feature has been discussed on discord. The following is a summary:
There are several options available to resolve this.
Pros:
Cons:
Pros:
Cons:
The PR in question has gone with option two to avoid breaking changes.
See comments by @LucioFranco on older issue https://github.com/hyperium/tonic/issues/221 for more details about this problem. I think https://github.com/rust-lang/rust/issues/29661 won't be available for some time and option 2 is a good middle ground and avoids this issue re-appearing again.
@LucioFranco any chance this could get an eye? :)
Sorry for the delay on my response @xanather.
This is a great write up and I think really the first option is the best but my concern is that I don't see this use case motivating enough to make this change. I would like to bundle a big breaking change to how we handle streams to include other ergonomic changes. I feel that maybe this could make sense once AFIT lands on stable which will force a breaking change to code gen'ed traits. I think if we bundled that together with other changes it would be a good candidate for one big breaking release change rather than a few.
Thought I should create an issue with corresponding PR I submitted.
Feature Request
Crates
tonic-build
Motivation
Re-implement/undo https://github.com/hyperium/tonic/issues/221 changes as optional feature.
This allows referencing gRPC models without version control which only permit backwards-compatible changes. It allows for setups provided by other programming language gRPC service generators that implement RPC's by default and return UNIMPLEMENTED error code for any methods which aren't explicitly handled.
Proposal
https://github.com/hyperium/tonic/pull/1344
Alternatives
I did try seeing if I can use some macro magic outside the library, but it becomes quite a hack.