Repository navigation
fix(config): accept leaf symlinks for user-global configuration files - #85
Merged
Merged
Conversation
Home Manager writes ~/.config/qq/config.ron as a symlink to a regular Nix store file. discover_file rejected every symlink, so that global file never loaded. SourceKind::Global now admits a leaf symlink whose resolved target is a regular file. Ancestors, including the global directory itself, stay ordinary directories. Project, explicit, managed, pack, and trust sources still reject symbolic links. Provenance records the canonical target. Tests cover a global config.ron link, a config.d fragment link, a project .qq/config.ron link, and a linked global directory. ADR-0035 records the decision. Closes #83.
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.
GitHub #83: Home Manager global config.ron is a symlink
Spec: GitHub #83; ADR-0035
Linear: none (GitHub-only issue)
What changed
discover_fileadmits aSourceKind::Globalleaf symlink when the resolved target is a regular file (config.ron,config.d/*.ron, and the same path used by globaltui.ron/themes/*.ron).How verified
cargo test -p qq-config symlink— 10 passedcargo test -p qq-config— 88 passedcargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspacecargo build --workspaceaccepts_global_leaf_symlink_to_a_regular_file,accepts_global_fragment_leaf_symlink_to_a_regular_file,rejects_project_leaf_symlink_sources,rejects_global_directory_symlink,rejects_symlink_sourcesMeasurements
No named performance gate for this change.
Docs
docs/adr/0035-global-leaf-config-symlinks.mddocs/adr/README.mddocs/design/architecture.mddocs/design/theme.mddocs/runbooks/local-dev.mddocs/README.mddocs/plans/progress/root.md(ADR-0035 reserved and accepted)docs/plans/progress/decisions-needed.md(row 8)Compatibility
Follow-ups / decisions needed
Closes #83.