Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TNS-38: ignore dependency on self, for CLJS
In Clojure (.clj) code, a namespace depending on itself makes no sense. But it is perfectly reasonable for a ClojureScript (.cljs) file to depend on a Clojure (.clj) file for macro definitions in the same namespace, via :require-macros. More generally, this means that a "namespace" is logically defined in multiple files, which tools.namespace does not yet handle. This causes spurious circular-dependency error in tools. See, for example, clojure-emacs/refactor-nrepl#127 It is easy to work around the specific case of self-dependency via :require-macros, which has no meaning anywhere else. As a consequence, tools.namespace will no longer throw an exception if an ordinary Clojure namespace tries to :require itself.
- Loading branch information