Add value interpolation
Value interpolation for config values that works similarly to ansible's variable interpolation with Jinja would be quite useful.
- Your app defines several data dirs or HTTP entry points.
- All dirs/entrypoints have a common prefix (base directory or base url)
- It would make life easier if you could just change the base directory instead of the values of multiple options.
- Your define an option for the base dir/URL
- You define multiple options for the sub-dirs/endpoins without the base dir/URL
- You create properties that return the concatenation of base-dir/sub-dir / base-URL/endpoint
Interpolation must happen after all settings sources have been read and before merging all the dicts into the settings instance. We already have a "fields list" so we can determine which options have already been read before the current option. Only those values can be used for interpolation. We maybe also need a "layered" dict to get the latest value for each option. But maybe the merged dict will be sufficient.
Evaluation is needed to decide if the workaround will be good enough of if the implementation of value interpolation will be complicated enough to not implement this feature.