mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-03 19:42:55 +00:00
Sometimes CI build fails with
error: couldn't read storage_broker/src/../proto/storage_broker.rs: No such file or directory (os error 2)
--> storage_broker/src/lib.rs:14:5
|
14 | include!("../proto/storage_broker.rs");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The root cause is not clear, but it looks like interference with cachepot. Per
cargo docs, build scripts shouldn't output to anywhere but OUT_DIR; let's follow
this and see if it helps.
12 lines
515 B
Rust
12 lines
515 B
Rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// Generate rust code from .proto protobuf.
|
|
//
|
|
// Note: we previously tried to use deterministic location at proto/ for
|
|
// easy location, but apparently interference with cachepot sometimes fails
|
|
// the build then. Anyway, per cargo docs build script shouldn't output to
|
|
// anywhere but $OUT_DIR.
|
|
tonic_build::compile_protos("proto/broker.proto")
|
|
.unwrap_or_else(|e| panic!("failed to compile protos {:?}", e));
|
|
Ok(())
|
|
}
|