fix: use absolute_path() when computing workspace root to preserve symlinks#5059
Merged
baszalmstra merged 2 commits intoprefix-dev:mainfrom Dec 4, 2025
Merged
Conversation
…mlinks The fix in prefix-dev#4912 for symlinked manifest paths was incomplete. While ManifestProvenance::absolute_path() correctly preserves symlinks by only canonicalizing the parent directory, the Workspace::from_manifests() function was re-canonicalizing the entire manifest path, which resolved the symlink and caused the .pixi directory to be created in the wrong location. This change uses absolute_path() instead of dunce::canonicalize() when computing the workspace root, ensuring that symlinked pixi.toml files work correctly in dotfiles workflows. Fixes the remaining issue from prefix-dev#4907. fixup lint
baszalmstra
approved these changes
Dec 4, 2025
Contributor
|
Thanks for the followup! |
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.
Description
Turns out my fix in #4912 was incomplete
I missed a second spot where the path gets canonicalized.
The absolute_path() method I added does the right thing, but
Workspace::from_manifests()was still callingdunce::canonicalize()directly on the manifest path before computing the workspace root.This PR makes the workspace code use
absolute_path()instead, which actually fixes the dotfiles workflow Iwas trying to support in the first place.
I added a test that specifically verifies the workspace root ends up in the right place when using a
symlinked manifest but happy to remove or consolidate somehow (could use guidance here) if thats better.
Fixes the remaining issue from #4907.
How Has This Been Tested?
AI Disclosure
Tools: Claude Opus 4.5
Checklist:
schema/model.py.