Add canonical config path resolvers - #8
Merged
Conversation
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
${dot:real_config}and${dot:real_config_dir}and centralizeDotPathsconstruction fromLoadedConfig${dot:config},${dot:config_dir}, diagnostics, reports, and entry-relativeLink.sourcebehaviorWhy
A
.dot.tomlentry may be a symbolic link stored under the platform-standard user configuration directory while repository resources live beside the linked file's real entity. The new resolvers let configurations opt into repository-relative paths without changing the established meaning of the selected entry path.User impact
Configurations can use
${dot:real_config_dir}for scripts and link sources that should follow a symlink to the repository. Existing configurations remain entry-relative unless they explicitly adopt the new resolver. Broken or otherwise unresolvable configuration entries now fail during loading because the configuration entity is canonicalized before reading.On Windows, canonical paths retain the OS-provided
\\?\spelling. Backslash suffixes should therefore be written with TOML literal strings.Validation
cargo test --locked --all-targets --all-featurescargo clippy --locked --all-targets --all-features -- -D warningscargo fmt --all -- --checkcargo check --locked --target x86_64-pc-windows-gnu --all-targets --all-featuresusing the matching rustup compilergit diff --check