This is, in a way, related to #112, and could be considered an alternative to it (although I would not be opposed to doing both, as I think this is necessary either way)
Currently, an array in default-config will be merged through concatenation with an array in the override configuration. That's convenient, and I feel that it's a good default behavior - However, there are circumstances in which I can imagine an IA wanting to completely replace an array (for example, if deploying a bot not named "Cadence", it would be preferable to completely replace the default custom commands and autoselectable play channels).
Therefore, I think we should allow the override config file to specify when an array should be overwritten instead of concatenated.
In addition to the current syntax of providing an array ("key": [...]), which should continue to concatenate the arrays together, we should support one of the following syntaxes:
Syntax 1 is a little more direct and slightly cleaner to implement, but it is less extensible than syntax 2 (which might allow us to provide new strategies in the future, such as a concatenateExcept sort of thing that allows an exceptions array to be removed).
If we go with syntax 1, we should permit overwrite to be false, and in syntax 2, we should allow the strategy to be set to concatenate. In both cases this would effectively be an extra-verbose way to state the default behavior.
This is, in a way, related to #112, and could be considered an alternative to it (although I would not be opposed to doing both, as I think this is necessary either way)
Currently, an array in
default-config
will be merged through concatenation with an array in the override configuration. That's convenient, and I feel that it's a good default behavior - However, there are circumstances in which I can imagine an IA wanting to completely replace an array (for example, if deploying a bot not named "Cadence", it would be preferable to completely replace the default custom commands and autoselectable play channels).Therefore, I think we should allow the override config file to specify when an array should be overwritten instead of concatenated.
In addition to the current syntax of providing an array (
"key": [...]
), which should continue to concatenate the arrays together, we should support one of the following syntaxes:Syntax 1 is a little more direct and slightly cleaner to implement, but it is less extensible than syntax 2 (which might allow us to provide new strategies in the future, such as a
concatenateExcept
sort of thing that allows anexceptions
array to be removed).If we go with syntax 1, we should permit
overwrite
to befalse
, and in syntax 2, we should allow thestrategy
to be set toconcatenate
. In both cases this would effectively be an extra-verbose way to state the default behavior.