Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Aug 8, 2024
1 parent 0fb380e commit cbcf8e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/protos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ const GRPC_OUTPUT_FILE: &str = "src/qdrant.rs";
fn protos() {
let out_time = timestamp(GRPC_OUTPUT_FILE);
let mut protos = std::fs::read_dir("proto").unwrap();
if !protos.any(|d| timestamp(d.unwrap().path()) > out_time)
&& timestamp("tests/protos.rs") <= out_time
{
// Make sure the proto files are not dirty
let protos_files_synced = !protos.any(|d| timestamp(d.unwrap().path()) > out_time);
let protos_test_synced = timestamp("tests/protos.rs") <= out_time;
if protos_files_synced && protos_test_synced {
println!("protobuf files not changed. Exiting early!");
return;
}
Expand Down Expand Up @@ -49,6 +50,7 @@ fn protos() {
// Vendor gRPC types used in our objects
append_to_file(GRPC_OUTPUT_FILE, "pub use prost_types::Timestamp;");

eprintln!("protos_files_synced:{protos_files_synced}, protos_test_synced:{protos_test_synced}");
panic!("proto definitions changed. Stubs recompiled. Please commit the changes.")
}

Expand Down

0 comments on commit cbcf8e7

Please sign in to comment.