Fix Windows workspace cache setup - #750
Open
rshabhsinha wants to merge 2 commits into
Open
rshabhsinha wants to merge 2 commits into
rshabhsinha wants to merge 2 commits into
Conversation
rshabhsinha
marked this pull request as ready for review
April 21, 2026 04:54
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a Windows startup failure in
pcb build/pcb layoutwhen creating<workspace>/.pcb/cache.Windows can reject directory symlink creation with
os error 1314unless Developer Mode or elevated privileges are enabled. This keeps the existing symlink path when available, and falls back to an NTFS junction for normal non-admin Windows users.Also handles replacing stale
.pcb/cachejunctions safely.Tests
cargo fmt --checkcargo check -p pcb-zencargo test -p pcb-zen --libNote
Medium Risk
Moderate risk because it changes filesystem link creation/removal behavior for the workspace cache on Windows, which could affect startup and path stability if edge cases are missed.
Overview
Fixes Windows failures creating
<workspace>/.pcb/cacheby falling back from directory symlinks to NTFS junctions when symlink creation is denied (e.g.,os error 1314).Refactors
ensure_workspace_cache_symlinkto detect whether the existing cache entry already targets~/.pcb/cache(symlink or junction), safely replace stale entries, and only add thejunctiondependency on Windows. Updates the changelog to document the fix.Reviewed by Cursor Bugbot for commit 88e9fe2. Configure here.