Fork me on GitHub
#integrant
<
2023-01-09
>
chrisetheridge08:01:14

has anyone ever figured out a way to configure a system from the system requiring it? for example, we have a generic error handling system. but, depending on which system started it, we want to configure the tags the errors are sent with. one way to handle this is have multiple systems with the tag configuration, which derives from the primary generic system. however, this can become cumbersome if you have many systems needing to vary the generic system something like this would be really nice. specifying additional configuration when referring to the system

:system/web
 {:error-handling {:ref-key :system/error-handler
                   :tags    #{:foo :bar :baz}}}

rickmoynihan14:01:54

@biscuitpants: we have a bunch of integrant projects where we’ve organised the config into a number of layers which all meta merged prior to init. I might be misunderstanding your question, but it trivially lets you have a common shared base config; and then any number of customer and environment specific configs that you layer on top of them.

chrisetheridge14:01:25

yeah we do the merging at init too, but your comment about meta merge has just helped me realise i can solve this problem without needing something in integrant core, using meta merge 😄 thank you @U06HHF230!

rickmoynihan14:01:22

you’re welcome