fix(config-include): reserve more paths for future#16278
fix(config-include): reserve more paths for future#16278weihanglo wants to merge 2 commits intorust-lang:masterfrom
Conversation
These paths are reserved for future extension: * `.cargo/config.toml.d` -> configuration fragment support * `.cargo/user.config.toml` -> auto-include user local config * `.cargo/user.config.toml.d` -> a combination of the above This is kinda modeled after `system.conf.d`: https://www.freedesktop.org/software/systemd/man/latest/system.conf.d.html
| return Ok(None); | ||
| } | ||
|
|
||
| let reserved_paths = ["config.toml.d", "user.config.toml", "user.config.toml.d"]; |
There was a problem hiding this comment.
Alternatives for user configuration:
local.config.tomlconfig.local.tomlconfig.user.toml
There was a problem hiding this comment.
If we can decide at this point, we can reserve all of them
There was a problem hiding this comment.
Maybe it would be better if we reserved the whole namespace (crates/*), at least temporarily. It would move the concern of what to reserve to a later date.
There was a problem hiding this comment.
I'm concerned about us having to guess what we might want in the future.
Would be interested in seeing an updated stabilization report as that might provide some context to help with this (e.g. what have we said about globs/directory previously?)
| return Ok(None); | ||
| } | ||
|
|
||
| let reserved_paths = ["config.toml.d", "user.config.toml", "user.config.toml.d"]; |
There was a problem hiding this comment.
For configuration fragments:
conf.dincludes- Can't think of others
There was a problem hiding this comment.
These actually doesn't need to be reserved, and they don't have .toml extension so aren't allowed already.
|
Going to close this, as I fee like reserving for glob and template syntax #16285 is good enough, as well as config fragment |
What does this PR try to resolve?
These paths are reserved for future extension:
.cargo/config.toml.d-> configuration fragment support.cargo/user.config.toml-> auto-include user local config.cargo/user.config.toml.d-> a combination of the aboveThis is kinda modeled after
system.conf.d:https://www.freedesktop.org/software/systemd/man/latest/system.conf.d.html
How to test and review this PR?
Maybe this need some bikeshedding?
See also #t-cargo > Built-in `.cargo/config.local.toml`for non-committed config