You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I build the crate locally or try to generate the docs with cargo doc --no-deps --open it works fine, however when building on the docs.rs website protoc seems to complain about the protocol definition (This does not happen locally).
[INFO] [stderr] Error: Custom { kind: Other, error: "protoc failed: devzat.proto:32:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\ndevzat.proto:33:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\ndevzat.proto:36:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\ndevzat.proto:40:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\ndevzat.proto:61:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\ndevzat.proto:63:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.\n" }
The text was updated successfully, but these errors were encountered:
Thanks for the quick response, this is a duplicate, however I'm not sure how to fix it. I do need protoc to generate the docs, since the whole API revolves around it, and I'm not too sure how to go about vendoring it.
Yep, as usual I've found these pages immediately after had posted questions here :)
Looks like there is no an easy way because even 22.04 has too outdated protoc. The hackery way is to delete protoc binary before build and it will lead to building of vendored protoc in prost-build crate. But it is such a waste of resources and against the good sense.
I have included prost build in my Cargo.toml using the vendored feature, but it still fails with the same issue.
prost-build = { version = "0.10.4", features = ["vendored"] }
Crate name
devzat-rs
Build failure link
https://docs.rs/crate/devzat-rs/0.1.1/builds/580868
Additional details
When I build the crate locally or try to generate the docs with
cargo doc --no-deps --open
it works fine, however when building on the docs.rs websiteprotoc
seems to complain about the protocol definition (This does not happen locally).The text was updated successfully, but these errors were encountered: