Uninitialized/literal configs
ieure opened this issue · comments
Ian Eure commented
I think that if Integrant has no ig/init-key
method defined for a key, it should return the configuration literally. For situations where I have static configuration data, such as:
{:my.thing/output-to "/path/to/place"
:other.thing/config {:dir #ig/ref :output-to}}
i have to define an ig/init-key
method for :output-to
which returns the config unmodified. Integrant should do that for me.
James Reeves commented
I considered it, but the disadvantage of defaulting to an identity function is that key typos don't raise an exception.
However, you can always define your own default if you want:
(defmethod ig/init-key :default [k v] v)