diff options
| author | Shroomy <sporeventexplosion@gmail.com> | 2025-03-24 11:01:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 11:01:19 +0000 |
| commit | 9f9c82d2d80868995c35f3c54a246ec8a87a607e (patch) | |
| tree | be570032f1339c629e7b6849987654e22ed02b0c | |
| parent | chore(deps): bump lukemathwalker/cargo-chef (#2639) (diff) | |
| download | atuin-9f9c82d2d80868995c35f3c54a246ec8a87a607e.zip | |
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.
| -rw-r--r-- | crates/atuin-daemon/build.rs | 7 |
1 files changed, 5 insertions, 2 deletions
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) } |
