cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Dependency cycle error with "sync file in REPL"

Open rauhs opened this issue 9 years ago • 4 comments

I keep getting a dependency cycle error in my CLJ file when I use garden:

https://github.com/noprompt/garden

And when I do a Sync file in REPL. Normal Load file in REPL works, though. Only with the sync it gives me:

Dependency cycle [units.cljc -> units.cljc -> units.cljc]

rauhs avatar Jun 09 '16 10:06 rauhs

I've been getting this when trying to do repl based testing, even with load file in repl:

clojure.test.check -> clojure.test.check.clojure-test -> clojure.test.check

This is problematic as I can't just run a shortcut or REPL->Run Tests in Current NS to run my tests...

Folcon avatar Oct 05 '19 02:10 Folcon

@Folcon Which Cursive version are you using? If you're using 1.9.0-eap4, you can do the following to diagnose this:

  1. Go to Help->Debug Log Settings...
  2. Add #cursive.repl.actions to the box there.
  3. Reproduce the error using "Tools->Load File in REPL".
  4. Check your log file (Help->Show Log in Finder/Explorer) for a message like: Namespace cycle:, and post it here.

cursive-ghost avatar Oct 05 '19 03:10 cursive-ghost

2019-10-05 12:23:14,893 [33787093]  DEBUG -          #cursive.repl.actions - Namespace cycle: clj:clojure.test.check (/Users/currentuser/.m2/repository/viebel/gadjett/0.5.4/gadjett-0.5.4.jar!/public/js/clojure/test/check.cljc, /Users/currentuser/.m2/repository/org/clojure/test.check/0.10.0/test.check-0.10.0.jar!/clojure/test/check.cljc) -> clj:clojure.test.check.clojure-test (/Users/currentuser/.m2/repository/org/clojure/test.check/0.10.0/test.check-0.10.0.jar!/clojure/test/check/clojure_test.cljc, /Users/currentuser/.m2/repository/viebel/gadjett/0.5.4/gadjett-0.5.4.jar!/public/js/clojure/test/check/clojure_test.cljc) -> clj:clojure.test.check (/Users/currentuser/.m2/repository/viebel/gadjett/0.5.4/gadjett-0.5.4.jar!/public/js/clojure/test/check.cljc, /Users/currentuser/.m2/repository/org/clojure/test.check/0.10.0/test.check-0.10.0.jar!/clojure/test/check.cljc)

Ok, so one thing I've picked up from doing this is that your message should probably list the namespaces that's causing the conflict? I just discovered where the issue is coming from, which is different to where I thought it was coming from...

I've removed gadjett temporarily, but I'm not 100% certain if this is a valid detection or not, as I can manually import this into the repl =)...

Folcon avatar Oct 05 '19 11:10 Folcon

Just stumbled across this issue myself. The solution that worked for me:

  • Settings > Languages & Frameworks > Clojure > uncheck Load out-of-date file dependencies transitively

xyztony avatar Aug 20 '24 13:08 xyztony