You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know whether is make sense to add a separate function for "Find clojurescript files", or to change clojure-file? to check for ".cljs?". Perhaps @stuartsierra could tells us the consequences of either.
The text was updated successfully, but these errors were encountered:
tools.namespace is currently oriented towards Clojure (JVM) sources only. The ns declaration parser will work on ClojureScript source files but it will not be able to load them, so changing clojure-file? to include .cljs files would break other features of tools.namespace.
If you want to search both .clj and .cljs sources, my current recommendation is to use custom code to search for files on the classpath (which is easy) and then call tools.namespace to parse the ns declarations.
Currently tools.namespace will not recognize :require-macros in ClojureScript. I do not know the consequences of adding support for :require-macros, but I am not opposed to adding it if there is a demonstrable use case and it doesn't break anything else.
It looks like when searching for Clojure namespace declarations (here https://github.com/timmc/nephila/blob/master/src/leiningen/nephila.clj#L44), Nephila uses
clojure.tools.namespace.find/find-ns-decls
, which ultimately calls out toclojure.tools.namespace.file/clojure-file?
(https://github.com/clojure/tools.namespace/blob/master/src/main/clojure/clojure/tools/namespace/file.clj#L25), which is checking for.clj
extensions on files.I don't know whether is make sense to add a separate function for "Find clojurescript files", or to change
clojure-file?
to check for ".cljs?". Perhaps @stuartsierra could tells us the consequences of either.The text was updated successfully, but these errors were encountered: