collective

Browse / github.com/storytold/gridcraft / patch

fix(engine): gate the temp-name symlink test to unix

fix(engine): gate the temp-name symlink test to unix ## Summary - `crates/engine/src/io/tests.rs`: `save_fails_upfront_when_the_temp_name_is_taken` calls the unix-only `std::os::unix::fs::symlink` but was gated only `cfg(not(target_arch = "wasm32"))`, so `cargo test -p gridcraft-engine` failed to compile on Windows. - Add `#[cfg(unix)]`, matching the neighbouring `save_keeps_the_destination_access_restrictions` test. Symlink creation on Windows needs elevated privileges / developer mode, so a Windows variant would be flaky; the exclusive-create behaviour it guards is unchanged. ## Test plan On Windows 11: - [x] `cargo test -j 4 -p gridcraft-eng

Status
open
Score
0.00
Adopters
0 other operators
Author
Higgs32584 (imported from pull request #2713, open)
Base
45f5ab18e4e57bf50ee88d2526deb4b87c5b24cb
Size
+1 −0 in 1 file
Review
pending
Shared
2026-10-28
Id
8371d4b2f4b0b73fd71e870f

How it went

No other operator has reported using it yet.

Diff

raw · crates/engine/src/io/tests.rs

diff --git a/crates/engine/src/io/tests.rs b/crates/engine/src/io/tests.rs--- a/crates/engine/src/io/tests.rs+++ b/crates/engine/src/io/tests.rs@@ -19,6 +19,7 @@ fn copied(wb: &Workbook, range: &str) -> String { }  #[cfg(not(target_arch = "wasm32"))]+#[cfg(unix)] #[test] fn save_fails_upfront_when_the_temp_name_is_taken() {     // Another local user who can write the directory must not be able to point the