mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 09:14:04 +00:00
gen-protos: make old protoc accept optional fields
The version installed by ubuntu "latest" doesn't seem to support optional fields yet. This is copied from the prost documentation. https://docs.rs/prost-build/latest/prost_build/struct.Config.html#method.protoc_arg
This commit is contained in:
parent
4348d0b487
commit
2382ae09e2
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,8 @@ fn main() -> Result<()> {
|
|||
prost_build::Config::new()
|
||||
.out_dir(&protos_dir)
|
||||
.include_file("mod.rs")
|
||||
// For old protoc versions. 3.12.4 needs this, but 3.21.12 doesn't.
|
||||
.protoc_arg("--experimental_allow_proto3_optional")
|
||||
.compile_protos(
|
||||
&input
|
||||
.into_iter()
|
||||
|
|
Loading…
Reference in a new issue