Repository navigation
fix(windows): build rune and install a deck on Windows - #85
LangrMartin wants to merge 2 commits into
Conversation
Relative paths that become stored or compared text go through services::paths, so manifest keys, provenance paths, and snapshot entries read with a forward slash on every platform. A manifest written with backslash keys is read as the same files. rune-docs reads the Windows file identity from the open handle through winapi-util, and the Unix target table in Cargo.toml sits below the dependencies that every platform needs. See docs/decisions/RUST-0015 Portable Path Text.md.
…e-module source A single-module source in .rune left the provenance source empty, so the installed snapshot check failed and every install ended with a warning that the source snapshot remains unverified. The deck branch already sets it.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Makes Windows builds and deck installs work by normalizing path text and using stable file-identity APIs, while preserving Unix behavior. Local file safeguards remain in place, and reported isolated Windows exercises cover installation and inspection commands. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Clippy 1.94.1 on my machine does not report them, so I assume the CI toolchain is newer. I left them alone to keep this change about Windows. I can add the fix here if you prefer that. |
|
Thank you for this pull request, LangrMartin. It is closed as superseded by #89, which carries its two fixes that Most of what this pull request fixes landed on
The port uses Both fixes shipped in v0.7.1, the first release that builds and runs on Windows. Its |
Make rune build on Windows and install a deck there. Behaviour on macOS and Linux does not change.
Note
Fix Windows build and deck install with slash-separated path handling
Cargo.tomlpreviously placed shared dependencies (includinggix) under the Unix-only target table, and rune-docs gains an optional Windowswinapi-utildependency in thelifecyclefeatureconfineandverify, and skips directory syncing on Windows via a sharedsync_directoryhelperslash_separators/slash_texthelpers and applies them across assemble, deploy, validate, drift, provenance, and manifest code so paths use slash separators on Windows.runesource inresolve_sourcessource_snapshot.path_textandbundle.Inventory.walkkeep that behavior; check those sites if path validation changesMacroscope summarized a6139fe.
Plan
Rune compares and splits relative paths as
/-separated text. On Windows those paths carried\, so the snapshot and bundle checks refused every path andrune installstopped withsource path has an ambiguous separator or control character. One helper now converts a path where it becomes stored or compared text, instead of patching call sites as they fail.docs/decisions/RUST-0015 Portable Path Text.mdrecords the decision.Changes
slash_textandslash_separatorsinsrc/services/paths.rsand routes relative paths through them inmanifest(snapshot, bundle, provenance paths),assemble/sources,deploy,doctor,drift,provenance/scan,provider/detection,skill_readiness,services/discovery, andvalidate.\keys as the same files insrc/manifest/read.rs. An install over such a manifest pruned the files it had just deployed.winapi-utilinrune-docs/src/spec/transaction/confine.rs. Thewindows_by_handlecalls did not compile on stable. Skips directory sync on Windows instaging.rs.[target.'cfg(unix)'.dependencies]table below the shared dependencies inCargo.toml. It had capturedgix,jsonschema,rust-embed, and the dashboard and TUI crates.#[cfg(unix)]insrc/services/atomic.rsandsrc/services/confine.rs, so the library tests compile on Windows.src/cli/dotrune/resolve.rs. This is a separate commit and not specific to Windows: the source was empty, and every install ended withsource snapshot remains unverified.Testing
Windows 11,
stable-x86_64-pc-windows-gnu, Rust 1.94.1, against the runedeck deck in an isolated target directory.rune add --cast all, thenrune install --provider claude: deploys, rules land inrules/.rune install: every file skipped as unchanged.rune doctor,rune drift,rune provenance: all files ok, identical, verified..trash/<stamp>/..claudewhose manifest has\keys: no file missing afterwards.cargo test -p rune-docs --features lifecycle: passes.cargo test --lib: passes apart from three tests that assert Unix-shaped path text, two inprovider::testsand one intarget::tests.cargo fmt --check, and Clippy on the touched files: clean.make testand the Linux suite: not run, there is no Linux machine here. The integration tests undertests/were not run on Windows either: they isolate the home directory throughHOME, whichdirs::home_dirignores there, so they would write to the real home directory.Still open on Windows: symlink assembly and deployment return an explicit error,
target::Scope::Projectbuilds its key by replacing/only, and the build prints warnings from the#[cfg(not(unix))]branches in the symlink code.Try it on Windows
rune installin a directory that an older tool already deployed into takes over.claude/.manifest. Run it against a copy first.Release Notes
🤖 Generated with Claude Code