forked from tokio-rs/prost
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Thank you for the example project.
It is working!!!
But using it in real project with latest rusttc 1.53.0 (53cb7b09b 2021-06-17 makes a strangle issue:
syntax = "proto3";
package main_data;
import "rust.proto";
message Data {
// generates the Uuid type instead of the string type
string id = 1 [(rust.codegen).type = UUID];
}
Generates code:
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Data {
/// generates the Uuid type instead of the string type
#[prost(uuid, tag="1")]
pub id: ::uuid::Uuid,
}
But then follows a build error:
error: proc-macro derive panicked
#[derive(Clone, PartialEq, ::prost::Message)]
| ^^^^^^^^^^^^^^^^
|
= help: message: called `Result::unwrap()` on an `Err` value: invalid message field Data.id
Caused by:
no type attribute
Now I add to project as in example :
prost = "0.8"
url = "2"
uuid = "0.8"
[patch.crates-io]
prost = { git = 'https://github.com/kaiserkarel/prosit' }
prost-derive = { git = 'https://github.com/kaiserkarel/prosit' }
prost-types = { git = 'https://github.com/kaiserkarel/prosit' }
prost-build = { git = 'https://github.com/kaiserkarel/prosit' }
May be I should use something like:
#[macro_use]
pub extern crate prost_derive;
What do you think about this issue?
Any ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels