From 4f5ab638df51d181e4e25747dd5ff00e6301ba59 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 11 Nov 2022 14:34:46 +0100 Subject: [PATCH] grpc: Add the experimental optional flag to protoc The `optional` keyword was first removed, and then re-added again, and then it was made into an experimental flag. Come on people, decide already which one it is... --- cln-grpc/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cln-grpc/build.rs b/cln-grpc/build.rs index 17f86d001..cd13d0529 100644 --- a/cln-grpc/build.rs +++ b/cln-grpc/build.rs @@ -1,3 +1,7 @@ fn main() { - tonic_build::compile_protos("proto/node.proto").unwrap(); + let builder = tonic_build::configure(); + builder + .protoc_arg("--experimental_allow_proto3_optional") + .compile(&["proto/node.proto"], &["proto"]) + .unwrap(); }