juxt / clip

Light structure and support for dependency injection
MIT License
228 stars 15 forks source link

:start-after #31

Open awb99 opened 2 years ago

awb99 commented 2 years ago

I have defined several services in my clip/aero system: [:config :start-logger :service-1 :service-2] :logger depends on :config. :service-1 and :service-2 depend also on :config.

Now I want to start :service-1 and :service-2 AFTER :logger is started. The reason is, that :start-logger sets up the loggers in a nice way (and sets up loglevels, etc).

Now I could solve this issue, by adding a reference to :logger in :service-1 and :service-2. But this means that I can not just call functions defined in any arbitrary namespace. Instead i have to write a wrapper that takes one argument that will be ignored (:logger) and then use the other arguments for the real function.

Thanks!

SevereOverfl0w commented 2 years ago

Possibly this is related to #8