Closed BlanceXR closed 1 year ago
In this situation, I'd read the configuration and incorporate it into the config map before initiation. So:
(-> config
(merge (aero/read-config "config.edn"))
(ig/init))
I see, so don't treat system config as a component, but as something that's used to build the ig-config, thanks
For example, say I have 2 keys
in this case,
::db
needsdb-config
, butdb-config
is inside of the::config
to make it work, I need to either have::db
take in the whole config, and then extract:db-config
from it, or to create another key, which takes a whole config, and emits a db-config.both options are not ideal IMO.
i'd hope to do something like:
which apparently won't work since
ig/ref
is just a ref before it's actually initialized.prep-key
won't cut it either as it technically belongs to::db
as well, which shouldn't know the whole system config being passed around. alsoprep-key
would prep a key universally, where in a monorepo, I could have different ns trying to init the same:core/db
for example, but they'd want to prep db differently based on how their config file structure look likeany suggestion?
btw, do you typically make a system
config
into a component?