I've been using lein-ring for some time now and in particular the 
auto-reload facility which I find very helpful.

Whilst I like the reloaded workflow in cider - using a variation of Stuart 
Sierra's user.clj - I also have a use-case with a bunch of micro-services 
starting in a Docker composition, each using command: lein ring 
server-headless.

This has been working tremendously well over the past couple of months for 
me, prior to seeking a dependency-injection solution to improve my 
tests/mocking.

With host volume mounts to the various projects, when I change the code for 
any service in the composition, lein-ring takes care of reloading, allowing 
me to execute integration-level and exploratory tests as I go (no restarts 
really helps with momentum).

However, I'm just getting started with component, and have reached an 
impasse where I cannot see a way of getting the reloading benefits of 
lein-ring without introducing a global system map.

I've created a minimal re-production of where I have got to and was hoping 
someone could advise on whether what I'm aiming for is possible.

https://github.com/codeasone/component-reload-issue

Stuart Sierra kindly recommended I raise the question on this mailing list, 
plus I've also raised an issue on the lein-ring project and received some 
helpful advice from weavejester 

https://github.com/weavejester/lein-ring/issues/189

Finally I should add, I'm presently having a better experience with mount. 
It appears to coexist happily with lein-ring functionality and give me the 
dependency injection and ability to swap in stubs 
github.com/tolitius/mount#swapping-alternate-implementations that I'm 
looking for.


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to