Why does (ig/load-namespaces config)
start the services?
My assumption is that you have a namespace which runs code at the top level (outside of a def or defn).
If you look at the code for load-namespaces
, then you can see that your expectation is correct. All it does it require namespaces (thus loading multimethods into scope)
https://github.com/weavejester/integrant/blob/59b692dc7727d7606fa29ed98c0418ba1beb650d/src/integrant/core.cljc#L190-L209
My expectation would be that it just loads the multimethod into scope
i.e. to start the service I’d still have to call (ig/init config)