Re-thinking: Layering of configuration
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
We currently (as of 0.13.x) support layering of configuration objects to merge configuration values.
This should be supported in the future as well.
Re-Thinking the layering mechanism
We might re-think the idea of layering a bit here.
Right now (AFAICR) the layering is executed on loading of the configuration. In future, we might implement this as an operation that happens on accessing the values.
This way, we would always keep all values from the sources and only "merge" the values when accessing a certain element.
Example:
# 1.toml
foo = 1
bar = 2
# 2.toml
bar = 3
// pseudo code:
Build config object
Register "1.toml"
Register "2.toml"
Access config at "bar"
- Mechanism finds out that "bar" is from "2.toml" and its value is 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing configuration-layering implementation and reading how configuration objects are loaded and accessed. Use the 1.toml and 2.toml example to define the intended behavior, including bar resolving to 3 while preserving the source values. Done means the future layering approach is specified and its behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100