Closed mattoni closed 2 years ago
It appears to come from this line which is taking Point2d
and converting it to Point2D
.
This should now have been addressed by commit 4dc9f0e. This commit makes prost-wkt
make use of the same package name capitalization as Prost.
Hmm... I've updated to the latest version (0.3.2) and I'm still hitting this snag. If it helps at all, I'm using tonic-build (which uses prost under the hood/same API)
Here's my build script:
use prost_wkt_build::*;
use std::{env, path::PathBuf};
fn main() {
let out = PathBuf::from("./compiled");
let descriptor_file = out.join("descriptors.bin");
tonic_build::configure()
.type_attribute(
".",
"#[derive(serde::Serialize,serde::Deserialize)]"
)
.out_dir("./compiled")
.extern_path(
".google.protobuf.Any",
"::prost_wkt_types::Any"
)
.extern_path(
".google.protobuf.Timestamp",
"::prost_wkt_types::Timestamp"
)
.extern_path(
".google.protobuf.Value",
"::prost_wkt_types::Value"
)
.extern_path(
".google.protobuf.Duration",
"::prost_wkt_types::Duration"
)
.file_descriptor_set_path(&descriptor_file)
.compile(
&[
"../idl/grpc/aero.joby/atp/marketplace/marketplace.proto",
"../idl/grpc/aero.joby/atp/core.proto",
],
&["../idl/grpc/aero.joby"],
)
.unwrap();
// TODO - https://github.com/fdeantoni/prost-wkt/issues/19
let descriptor_bytes = std::fs::read(descriptor_file).unwrap();
let descriptor = FileDescriptorSet::decode(&descriptor_bytes[..]).unwrap();
prost_wkt_build::add_serde(out, descriptor);
}
The path doing the conversion I referenced above is still explicitly mentioning PascalCase.
Unsure how this is happening, but I have a type,
Point2d
, that is getting some generated code from prost-wkt referring to it asPoint2D
with the capital D.Point2D
does not appear anywhere in my idl files or in my code. I'm unsure where this is coming from.