duct 2021-10-27

Hi folks, I have a module at the top level of my config.edn and using profiles. For some reason the init-key does not get called (I have put printlns in there). Am I missing something w.r.t. to when modules are called?

Not sure if it matters, but does it derive from :duct/module ?

Yeah this is what I have in resources/duct_hierarchy.edn

{:duct.profile/web [:duct.profile/base]
 :duct.profile/core [:duct.profile/base]
 :duct.profile/infra [:duct.profile/base]
 :duct.profile/routes [:duct.profile/base]
 :duct.module/reloadable-routes [:duct/module]}

Is there a way to debug if the module indeed derives that key sorry a bit rusty on these things

Oh found, sorry for the laziness, will test this at the repl -> https://clojuredocs.org/clojure.core/derive

Is that module implemented in a separate library, or is it part of the same code base? Duct needs to load and eval the namespace where the module Integrant multi-method for that key. And by default uses the key name to derive the namespace. If they don't match, then you need to tell Duct/Integrant how to find it, or load and eval the namespace yourself.

it is in the code base but I think I require the namespaces, I will double check but this is is a very good point