diff --git a/Cargo.lock b/Cargo.lock index 87e12bb..7fba03c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,7 +240,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 2.1.1", "shlex", "syn 2.0.108", ] @@ -780,10 +780,13 @@ dependencies = [ "serde", "serde_json", "sha2", + "sqlite-watcher", "tempfile", "tokio", "tokio-postgres", "toml", + "tonic", + "tower", "tracing", "tracing-subscriber", "url", @@ -1200,10 +1203,8 @@ dependencies = [ [[package]] name = "fxhash" version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "byteorder", + "rustc-hash 1.1.0", ] [[package]] @@ -2583,6 +2584,70 @@ dependencies = [ "prost", ] +[[package]] +name = "protoc-bin-vendored" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c381df33c98266b5f08186583660090a4ffa0889e76c7e9a5e175f645a67fa" +dependencies = [ + "protoc-bin-vendored-linux-aarch_64", + "protoc-bin-vendored-linux-ppcle_64", + "protoc-bin-vendored-linux-s390_64", + "protoc-bin-vendored-linux-x86_32", + "protoc-bin-vendored-linux-x86_64", + "protoc-bin-vendored-macos-aarch_64", + "protoc-bin-vendored-macos-x86_64", + "protoc-bin-vendored-win32", +] + +[[package]] +name = "protoc-bin-vendored-linux-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c350df4d49b5b9e3ca79f7e646fde2377b199e13cfa87320308397e1f37e1a4c" + +[[package]] +name = "protoc-bin-vendored-linux-ppcle_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55a63e6c7244f19b5c6393f025017eb5d793fd5467823a099740a7a4222440c" + +[[package]] +name = "protoc-bin-vendored-linux-s390_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dba5565db4288e935d5330a07c264a4ee8e4a5b4a4e6f4e83fad824cc32f3b0" + +[[package]] +name = "protoc-bin-vendored-linux-x86_32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8854774b24ee28b7868cd71dccaae8e02a2365e67a4a87a6cd11ee6cdbdf9cf5" + +[[package]] +name = "protoc-bin-vendored-linux-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38b07546580df720fa464ce124c4b03630a6fb83e05c336fea2a241df7e5d78" + +[[package]] +name = "protoc-bin-vendored-macos-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89278a9926ce312e51f1d999fee8825d324d603213344a9a706daa009f1d8092" + +[[package]] +name = "protoc-bin-vendored-macos-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81745feda7ccfb9471d7a4de888f0652e806d5795b61480605d4943176299756" + +[[package]] +name = "protoc-bin-vendored-win32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3" + [[package]] name = "ptr_meta" version = "0.1.4" @@ -2862,6 +2927,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -3254,6 +3325,7 @@ dependencies = [ "clap", "dirs", "prost", + "protoc-bin-vendored", "rusqlite", "serde", "serde_json", diff --git a/PR_BODY.md b/PR_BODY.md index cc21e29..3dec17c 100644 --- a/PR_BODY.md +++ b/PR_BODY.md @@ -1,7 +1,7 @@ ## Summary -- fix sqlite sync change-state handling by treating watcher wal_frame/cursor fields as optional strings and cleaning up unused code -- implement FromStr for sqlite ChangeOperation and resolve needless borrow lints in queue/server modules -- keep clippy happy by applying the suggested clamp change and ensuring proto tests build +- vendor `protoc` via `protoc-bin-vendored` so sqlite-watcher can build on runners without system protobuf +- update build script to set `PROTOC` before invoking `tonic_build` +- refresh Cargo.lock to capture the new dependencies ## Testing - cargo clippy diff --git a/sqlite-watcher/Cargo.toml b/sqlite-watcher/Cargo.toml index b81704e..2cb9751 100644 --- a/sqlite-watcher/Cargo.toml +++ b/sqlite-watcher/Cargo.toml @@ -10,6 +10,7 @@ build = "build.rs" [build-dependencies] tonic-build = "0.11" +protoc-bin-vendored = "3" [dependencies] anyhow = "1.0" diff --git a/sqlite-watcher/build.rs b/sqlite-watcher/build.rs index a38290d..e71d018 100644 --- a/sqlite-watcher/build.rs +++ b/sqlite-watcher/build.rs @@ -1,4 +1,6 @@ fn main() -> Result<(), Box> { + let protoc = protoc_bin_vendored::protoc_bin_path()?; + std::env::set_var("PROTOC", protoc); tonic_build::configure() .build_client(true) .build_server(true)