Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug on codegen in ::prost::Enumeration #955

Closed
wants to merge 1 commit into from

Conversation

megsdevs
Copy link

@megsdevs megsdevs commented Dec 4, 2023

Fixes #927 and #812, caused by #853.

Reverting the changes until a working implementation + test(s) have been built.

I encourage @Leulz to address this before bringing it back in.

@megsdevs
Copy link
Author

megsdevs commented Dec 5, 2023

draft until resolved compatibility with current version of tonic

@megsdevs
Copy link
Author

megsdevs commented Dec 5, 2023

This uncovered another bug with codegen where all message data structures are not implementing the Message trait with the expected path. An example:

error[E0277]: the trait bound `grpc_codegen::Empty: prost::message::Message` is not satisfied
    --> /Users/megan/git/trade-api/target/debug/build/valorem-trade-9bf8c220466cd8d7/out/valorem.trade.v1.rs:1706:65
     |
1706 |                         let mut grpc = tonic::server::Grpc::new(codec)
     |                                        ------------------------ ^^^^^ the trait `prost::message::Message` is not implemented for `grpc_codegen::Empty`
     |                                        |
     |                                        required by a bound introduced by this call
     |
     = help: the following other types implement trait `prost::message::Message`:
               bool
               i32
               i64
               u32
               u64
               f32
               f64
               prost_types::compiler::Version
             and 76 others
     = note: required for `ProstCodec<FeeStructure, grpc_codegen::Empty>` to implement `Codec`

Open to suggestions on resolving this

@megsdevs megsdevs marked this pull request as ready for review December 5, 2023 21:42
@megsdevs megsdevs closed this Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug on codegen in ::prost::Enumeration
1 participant