From aaebdd14ba4354d32a0d401d30f6f4a7e351961b Mon Sep 17 00:00:00 2001 From: d3rpp Date: Thu, 25 Jul 2024 17:00:07 +1200 Subject: [PATCH] fix tonic-build cargo build script outputs --- interop/build.rs | 2 +- tonic-build/src/prost.rs | 6 +++--- tonic-web/tests/integration/build.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interop/build.rs b/interop/build.rs index 7783987a9..4561c9c7d 100644 --- a/interop/build.rs +++ b/interop/build.rs @@ -4,5 +4,5 @@ fn main() { tonic_build::compile_protos(proto).unwrap(); // prevent needing to rebuild if files (or deps) haven't changed - println!("cargo:rerun-if-changed={}", proto); + println!("cargo::rerun-if-changed={}", proto); } diff --git a/tonic-build/src/prost.rs b/tonic-build/src/prost.rs index f3c65cefd..27f953c20 100644 --- a/tonic-build/src/prost.rs +++ b/tonic-build/src/prost.rs @@ -547,7 +547,7 @@ impl Builder { } /// Enable or disable emitting - /// [`cargo:rerun-if-changed=PATH`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed) + /// [`cargo::rerun-if-changed=PATH`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed) /// instructions for Cargo. /// /// If set, writes instructions to `stdout` for Cargo so that it understands @@ -648,14 +648,14 @@ impl Builder { if self.emit_rerun_if_changed { for path in protos.iter() { - println!("cargo:rerun-if-changed={}", path.as_ref().display()) + println!("cargo::rerun-if-changed={}", path.as_ref().display()) } for path in includes.iter() { // Cargo will watch the **entire** directory recursively. If we // could figure out which files are imported by our protos we // could specify only those files instead. - println!("cargo:rerun-if-changed={}", path.as_ref().display()) + println!("cargo::rerun-if-changed={}", path.as_ref().display()) } } diff --git a/tonic-web/tests/integration/build.rs b/tonic-web/tests/integration/build.rs index 88418c2df..29a57475c 100644 --- a/tonic-web/tests/integration/build.rs +++ b/tonic-web/tests/integration/build.rs @@ -7,5 +7,5 @@ fn main() { protos .iter() - .for_each(|file| println!("cargo:rerun-if-changed={}", file)); + .for_each(|file| println!("cargo::rerun-if-changed={}", file)); }