-
Notifications
You must be signed in to change notification settings - Fork 235
Re-thinking: Layering of configuration #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As much as it would be great for debugging purposes, it might impair performance of the solution. Is this proposal motivated by some real life problems that is solves? EDIT: I've read linked issue. @dnaka91, would it be enough if sources of configuration were traced on the builder level, but not on |
No, I am just thinking from the ground up how this crate could look like in the future. |
Another benefit of preserving the layering after load-time is that the client application can iterate over the layers and print the configs in each layer. That came up in jj-vcs/jj#917 (comment) |
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:
The text was updated successfully, but these errors were encountered: