I'm trying to figure out some strange behavior ensuring that 'cdoc' is
always available in my user namespace.
I have in my ~/.lein/profiles.clj this block:
{:user {:dependencies [[jdt "0.1.0-SNAPSHOT"] ;jdt.*
[org.clojure/tools.trace "0.7.6"]
[org.thnetos/cd-client "0.3.6"] ;cd-client.core
[org.clojure/tools.logging "0.2.6"]
;;[spyscope "0.1.4"]
]
:injections [(use '[jdt core cl shell java])
(use 'clojure.tools.trace)
(use '[clojure.tools.logging :exclude [trace]])
(require 'clojure.inspector)
(require 'cd-client.core) ; cdoc, sometimes already
'use'd
(if-not (defined? 'cdoc)
(use 'cd-client.core))
;;(require 'spyscope.core)
(println "~/.lein/profiles.clj")
(println " using jdt.*,
clojure.tools.{trace,logging}, cd-client.core")
]}}
If I run 'cider' from emacs, I get no problems.
If I do 'lein repl' however I get this:
$ lein repl
~/.lein/profiles.clj
using jdt.*, clojure.tools.{trace,logging}, cd-client.core
nREPL server started on port 56072 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.5.1
IllegalStateException cdoc already refers to: #'cd-client.core/cdoc in
namespace: user clojure.lang.Namespace.warnOrFailOnReplace
(Namespace.java:88)
#<Namespace user>
Error loading namespace; falling back to user
nil
user=>
for Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
It appears that something is executed *after* the injections that is trying
to add cdoc to the user namespace.
This thing has been on-again off again depending on where I'm running
clojure. If I unconditionally attempt to use cdoc, it fails in some
situations. If I conditionally use it, it fails in some situations.
Ideas?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.