Fork me on GitHub

In my main config I have a key, which is #ig/refed by a number of other components. What's the Right Way to replace that component in my dev profile with, so that all refs are updated automatically (so that I don't have to hunt down each reference to and override it)?


Even better is if it can prevent the key from ever being initialized, since its config is validated in ig/pre-init-spec


I've thought about these options: * Determining which component (real or dev client) to init in ig/init-key, based on config. This is quick and easy, but mixes test- and prod code, which is less nice. * Using and keys which both derive from, with configured in the base profile, and in the dev profile. However, if I do this I'll still have to dissoc from the config before initializing the system, otherwise I'll have both defined, and is still initialized.


I've also tried just overriding in my dev profile, but then it seems like all the #ig/refs to it from other components are broken


Overriding it in dev.edn profile should work. Is a base profile key, or a module key?


Thanks for your response 👍. I'll try and repro in a test project and post here.


I figured out a way to do it: by introducing an intermediate component, which is referenced by other components, and returns the component it is configured with. In the base profile it is configured with, and in dev profile with


Is there maybe another/better way to achieve the same result?