-
I often use what I call "configuration overlays". Passing a config snippet with global option After reading https://confuse.readthedocs.io/en/latest/usage.html#view-theory a couple of times it is still not clear to me how exactly confuse works when there are yaml-dicts (yaml-hashes? terminology?) or yaml-lists in use and also what "the application decides" means. A practical example:
we pass an overlay config with
What will the "running config" be in that case? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Sure I can always check what's the actual config like this:
which tells me that in the case of above's example, only plug2 and plug4 will be in use. but I'd like to understand the theory/logic behind it! |
Beta Was this translation helpful? Give feedback.
-
It's honestly pretty subtle, but the logic works like this:
The effect is that, for each configuration value lookup ( |
Beta Was this translation helpful? Give feedback.
It's honestly pretty subtle, but the logic works like this:
config["plugins"]
, which says "look up theplugins
key and give me the corresponding value."plugins
key and give me that value." If it has aplugins
field, that's what we see. If not, i.e., if that configuration didn't have aplugins
key in it, we continue on to the next source and see if it has one. We iterate on down th…