Hello fellow Clojurians,
I would like to make my Clojure project extensible by auto-loading its plugin namespaces from the classpath. I would like to solve it by require
-ing every namespace that has a given prefix.
(require-all-ns 'module.custom)
;; this should require module.custom.video, module.custom.audio, module.custom.xxx, ...
- Obviously
all-ns
does not work here as it only lists already loaded namespaces. - I can easily find all namespaces by walking the file system. But I want it to work when additional namespaces are inside a jar file on in an other directory on the classpath. I also need it to work when my program is packaged.
My question is: how to require every namespaces from the file system?
Thank you