Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.namespace by
I use {{org.clojure/tools.namespace "0.3.0-alpha4"}} to detect circular dependencies among arbitrary objects. It works fine, but the error could be more informative for a certain case:


{:type clojure.lang.ExceptionInfo
   :message "Circular dependency between x and y"
   :data {:reason :clojure.tools.namespace.dependency/circular-dependency, :node x, :dependency y}
   :at [clojure.core$ex_info invokeStatic "core.clj" 4617]}


{{x}} and {{y}} are redacted data.

The problem is that neither x or y depend on each other directly, but via an indirect path.

It would be tremendously useful if the exception itself informed of the full faulty path, instead of just the beginning and end.

Example of desired exception:

 
 :data {:reason :clojure.tools.namespace.dependency/circular-dependency, :node x, :dependency y, :path [x a b c y]}
 

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/TNS-49 (reported by alex+import)
...