YahooArchive / mojito

[archiving soon] Yahoo! Mojito Framework
BSD 3-Clause "New" or "Revised" License
1.57k stars 214 forks source link

Allow the same context to be used multiple times in configuration #1254

Closed jlecomte closed 10 years ago

jlecomte commented 11 years ago

Our application configuration is spread across multiple files (we use the "applicationConfigFiles" directive to include additional configuration files into our main application.yaml...) Unfortunately, when the same context is specified multiple times, e.g. "runtime:server,lang:fr-FR", mojito throws an error:

error: (addon-rs-config): 
settings "runtime:server,lang:fr-FR" exists in both 
/blah/blah/blih/base.yaml and
/blah/blah/blah/application.yaml

Because the order matters in the "applicationConfigFiles" directive, we should be allowed to use the same context multiple times. If the same configuration setting is set multiple times, the last one should take precedence...

drewfish commented 11 years ago

Should the last one take precedence, or merge over an earlier one? The merge allows a particular context to be "built up" from multiple files. (Alas, merging arrays is problematic.)

jlecomte commented 11 years ago

merge over = take precedence. I don't see the difference...

drewfish commented 11 years ago

I guess I was trying to make a distinction between "replace" and "merge". You seem to have been thinking of "merge" too, so I think we have the same idea :smile:.

jlecomte commented 10 years ago

Can we prioritize this request? We would like to have it by the end of November/early December. Thanks!

caridy commented 10 years ago

bumping this into trello board: https://trello.com/c/XYLOloRT/768-search-gh-1254-allow-the-same-context-to-be-used-multiple-times-in-configuration

drewfish commented 10 years ago

Available in mojito 0.8.1.