You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
fix(embedded): Windows protoc fails with extended-length path from canonicalize() #39
Building `coordinode-embedded` on Windows fails because `canonicalize()` in `coordinode-raft/build.rs` returns a Windows extended-length path (UNC prefix `\\?\`) that protoc does not support:
```
Error: protoc failed: Invalid file name pattern or missing input file
"\\?\D:\a\...\proto/coordinode/v1/replication/raft.proto"
```
`std::path::Path::canonicalize()` on Windows produces `\\?\D:\...\path` which is a verbatim UNC prefix. protoc does not handle this prefix and rejects the path.
Suggested fix
In `coordinode-rs/crates/coordinode-raft/build.rs`, strip the `\\?\` prefix on Windows before passing the path to protoc:
```rust
#[cfg(target_os = "windows")]
fn strip_unc_prefix(p: std::path::PathBuf) -> std::path::PathBuf {
let s = p.to_string_lossy();
if let Some(stripped) = s.strip_prefix(r"\\?\") {
std::path::PathBuf::from(stripped)
} else {
p
}
}
```
Or use the `dunce` crate (already common in Rust build scripts) which simplifies `\\?\` paths portably.
Files involved
`coordinode-rs/crates/coordinode-raft/build.rs`
Context
Observed in CI: build job `build-embedded / windows-latest` after merging PR #37.
Activity
fix(build): strip \\?\ UNC prefix from canonicalize() on Windows
ci(release): fix embedded wheel builds for Windows, macOS, and Linux …
build(win): strip \\?\ UNC prefix from canonicalize() for protoc
fix(build): strip \\?\ UNC prefix from canonicalize() on Windows
build(win): strip \\?\ UNC prefix from canonicalize() for protoc