This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 9333a850d Don't generate empty google.protobuf.rs (#2005)
9333a850d is described below
commit 9333a850dd331aded6c5d73febf8f2413b4442ef
Author: Raphael Taylor-Davies <[email protected]>
AuthorDate: Fri Jul 8 12:00:13 2022 -0400
Don't generate empty google.protobuf.rs (#2005)
* Don't generate empty google.protobuf.rs
* Verify file is empty
---
arrow-flight/build.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arrow-flight/build.rs b/arrow-flight/build.rs
index 2054f8e71..25f034ac1 100644
--- a/arrow-flight/build.rs
+++ b/arrow-flight/build.rs
@@ -88,6 +88,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
file.write_all(buffer.as_bytes())?;
}
+ // Prost currently generates an empty file, this was fixed but then
reverted
+ // https://github.com/tokio-rs/prost/pull/639
+ let google_protobuf_rs = Path::new("src/sql/google.protobuf.rs");
+ if google_protobuf_rs.exists() &&
google_protobuf_rs.metadata().unwrap().len() == 0 {
+ std::fs::remove_file(google_protobuf_rs).unwrap();
+ }
+
// As the proto file is checked in, the build should not fail if the file
is not found
Ok(())
}