You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2022/10/25 22:07:36 UTC
[arrow-rs] branch master updated: Cleanup generated proto code (#2921)
This is an automated email from the ASF dual-hosted git repository.
tustvold 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 4d5d10d81 Cleanup generated proto code (#2921)
4d5d10d81 is described below
commit 4d5d10d81287039140a3b6f4439e2de43e201a8a
Author: Raphael Taylor-Davies <17...@users.noreply.github.com>
AuthorDate: Wed Oct 26 11:07:29 2022 +1300
Cleanup generated proto code (#2921)
* Cleanup generated proto code
* Add workspace clean check
---
.gitattributes | 2 ++
.github/workflows/arrow_flight.yml | 2 ++
arrow-flight/build.rs | 8 ++------
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index 51008d2e3..b7b0d51ff 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,3 @@
parquet/src/format.rs linguist-generated
+arrow-flight/src/arrow.flight.protocol.rs linguist-generated
+arrow-flight/src/sql/arrow.flight.protocol.sql.rs linguist-generated
diff --git a/.github/workflows/arrow_flight.yml b/.github/workflows/arrow_flight.yml
index 686dee9ff..d40c9b6ec 100644
--- a/.github/workflows/arrow_flight.yml
+++ b/.github/workflows/arrow_flight.yml
@@ -61,6 +61,8 @@ jobs:
- name: Test --all-features
run: |
cargo test -p arrow-flight --all-features
+ - name: Verify workspace clean
+ run: git diff --exit-code
clippy:
name: Clippy
diff --git a/arrow-flight/build.rs b/arrow-flight/build.rs
index 25f034ac1..4ceb29835 100644
--- a/arrow-flight/build.rs
+++ b/arrow-flight/build.rs
@@ -16,16 +16,12 @@
// under the License.
use std::{
- env,
fs::OpenOptions,
io::{Read, Write},
path::Path,
};
fn main() -> Result<(), Box<dyn std::error::Error>> {
- // override the build location, in order to check in the changes to proto files
- env::set_var("OUT_DIR", "src");
-
// The current working directory can vary depending on how the project is being
// built or released so we build an absolute path to the proto file
let path = Path::new("../format/Flight.proto");
@@ -39,6 +35,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
// protoc in unbuntu builder needs this option
.protoc_arg("--experimental_allow_proto3_optional")
+ .out_dir("src")
.compile(&[proto_path], &[proto_dir])?;
// read file contents to string
@@ -56,8 +53,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
file.write_all(buffer.as_bytes())?;
}
- // override the build location, in order to check in the changes to proto files
- env::set_var("OUT_DIR", "src/sql");
// The current working directory can vary depending on how the project is being
// built or released so we build an absolute path to the proto file
let path = Path::new("../format/FlightSql.proto");
@@ -71,6 +66,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
// protoc in unbuntu builder needs this option
.protoc_arg("--experimental_allow_proto3_optional")
+ .out_dir("src/sql")
.compile(&[proto_path], &[proto_dir])?;
// read file contents to string