circular dependency when CLJS namespace requires CLJ for macros

Description

When a .cljs file defines a namespace with :require-macros of the same namespace name as a .clj file, tools.namespace reports a circular dependency error.

See https://github.com/clojure-emacs/refactor-nrepl/issues/127 for example

Environment

None

Activity

Show:
Stuart Sierra
January 5, 2016, 1:50 PM

Fixed in commit 5d6957d by ignoring :require-macros when analyzing dependencies. I believe this is the correct solution for now: tools.namespace will treat Clojure and ClojureScript as separate worlds, and will not attempt to analyze dependency relationships which cross that boundary.

Stuart Sierra
November 28, 2015, 3:07 PM

Reopening. Solution in -alpha2 is inadequate, see commit message at commit 149f4650

Stuart Sierra
November 13, 2015, 3:26 PM

Included in 0.3.0-alpha2 release

Stuart Sierra
November 6, 2015, 10:44 PM

Short-term fix in commit 6b19f942

Stuart Sierra
November 6, 2015, 9:05 PM

Or maybe :require-macros shouldn't be parsed at all, since it is crossing the boundary between .cljs and .clj

Completed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Stuart Sierra

Reporter

Stuart Sierra