diff --git a/.gitattributes b/.gitattributes index 51008d2e3b4a..b7b0d51ff478 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 686dee9ff042..d40c9b6ecee7 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 25f034ac191b..4ceb298359db 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> { - // 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> { 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> { 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> { 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