From 9f9c82d2d80868995c35f3c54a246ec8a87a607e Mon Sep 17 00:00:00 2001 From: Shroomy Date: Mon, 24 Mar 2025 11:01:19 +0000 Subject: fix(build): change atuin-daemon build script .proto paths (#2638) Modify paths specified in atuin-daemon build.rs to make tonic-build print the correct cargo:rerun-if-changed instructions. Fixes atuin-daemon being rebuilt unconditionally, even if .proto files are unchanged. --- crates/atuin-daemon/build.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/atuin-daemon/build.rs b/crates/atuin-daemon/build.rs index fc816119..767a4a12 100644 --- a/crates/atuin-daemon/build.rs +++ b/crates/atuin-daemon/build.rs @@ -3,7 +3,10 @@ use std::{env, fs, path::PathBuf}; use protox::prost::Message; fn main() -> std::io::Result<()> { - let file_descriptors = protox::compile(["history.proto"], ["./proto/"]).unwrap(); + let proto_paths = ["proto/history.proto"]; + let proto_include_dirs = ["proto"]; + + let file_descriptors = protox::compile(proto_paths, proto_include_dirs).unwrap(); let file_descriptor_path = PathBuf::from(env::var_os("OUT_DIR").expect("OUT_DIR not set")) .join("file_descriptor_set.bin"); @@ -13,5 +16,5 @@ fn main() -> std::io::Result<()> { .build_server(true) .file_descriptor_set_path(&file_descriptor_path) .skip_protoc_run() - .compile_protos(&["history.proto"], &["."]) + .compile_protos(&proto_paths, &proto_include_dirs) } -- cgit v1.3.1