Skip to content

Re-thinking: Layering of configuration #324

@matthiasbeyer

Description

@matthiasbeyer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions