Hi everyone,
I've re-arranged some code in a project of mine and it seems I've
introduced cyclic dependencies...It doesn't make sense though! I get the
following message:
=> (load-file "src/Clondie24/games/chess.clj")
Exception Cyclic load dependency: [ /Clondie24/lib/core
]->/Clondie24/games/chess->[ /Clondie24/lib/core ]
clojure.core/check-cyclic-dependency (core.clj:5430)
presumably, that means that it tried to load chess.clj which depends on
core.clj but while loading core.clj it detected a dependency back to
chess! However, look at my ns declarations:
(ns Clondie24.lib.core ;;as you can see core.clj depends on no game but
all games depend on core.clj
(:require [Clondie24.lib.util :as ut]
[clojure.core.reducers :as r]
[enclog.training :as evo]
[enclog.normalization :refer [prepare input output]])
(:import [encog_java.customGA CustomNeuralGeneticAlgorithm Referee]
[org.encog.neural.networks BasicNetwork]))
(ns Clondie24.games.chess
(:require [Clondie24.lib.util :as ut]
[Clondie24.lib.core :as core]
[Clondie24.lib.search :as s]
[Clondie24.lib.rules :as rul]
[Clondie24.lib.gui :as gui]
[enclog.nnets :as ai]
[enclog.training :as evol]
[enclog.normalization :as norm])
(:import #_[encog_java.customGA CustomNeuralGeneticAlgorithm
CustomGeneticScoreAdapter Referee]
[Clondie24.lib.core Player]))
Suddenly the same happens with all my games!!! If I try to load into
core.clj directly everything goes fine...
I should point out that there is some Java glue code which loads some
functions from core.clj as well...In fact, that is the major change that
I did today...I wanted the ability to genetically train all my games and
thus the relevant functions should be in the core ns - not in chess.clj.
So I moved them into core and now this...weird stuff!!!
also, util.clj obviously doesn't depend on chess.clj...
any ideas guys? I've had this error before but it was pretty obvious
where the cycle was...Here, I'm very confused! core.clj and util.clj are
the lowest level code and thus depend on nothing from the same project!
thanks in advance for your time,
Jim
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.