From f62cedd539d792ad23d70a88073ce37f3c882e73 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Thu, 30 Jul 2026 15:37:06 +0800 Subject: [PATCH] fix: stabilize proto build fingerprints --- synctv-proto-build/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/synctv-proto-build/src/lib.rs b/synctv-proto-build/src/lib.rs index 300aa5a3..4edc1343 100644 --- a/synctv-proto-build/src/lib.rs +++ b/synctv-proto-build/src/lib.rs @@ -1043,7 +1043,11 @@ fn build_playback_provider_protos( fn prepare_build() -> Result<(PathBuf, PathBuf), Box> { let protoc = protoc_bin_vendored::protoc_bin_path()?; let out_dir = build_out_dir()?; - emit_proto_rerun_if_changed(Path::new("proto"))?; + // Cargo resolves relative rerun paths against the package manifest directory, + // while the thin proto crates run this helper from the shared synctv-proto + // directory. Emit absolute paths so Cargo watches the files we actually read. + let proto_dir = fs::canonicalize("proto")?; + emit_proto_rerun_if_changed(&proto_dir)?; Ok((protoc, out_dir)) }