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

Possible version mismatch #1747

Closed
tommyp6 opened this issue Jun 23, 2022 · 3 comments
Closed

Possible version mismatch #1747

tommyp6 opened this issue Jun 23, 2022 · 3 comments

Comments

@tommyp6
Copy link

tommyp6 commented Jun 23, 2022

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 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" }
@syphar
Copy link
Member

syphar commented Jun 23, 2022

this sounds like a duplicate of #1741 , more info there.

Our build-image currently can only contain ubuntu standard packages, and protoc is outdated on these.

until we have #315 your options are probably vendoring (as you stated), or conditional compilation if you don't need protoc for the docs.

@syphar syphar closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
@syphar
Copy link
Member

syphar commented Jun 23, 2022

( please reopen if I'm mistaken )

@tommyp6
Copy link
Author

tommyp6 commented Jun 23, 2022

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"] }

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

No branches or pull requests

2 participants