Yeah, they changed that from clojure 1.1 and it's really annoying ---
as far as I know, your only options right now are to either select
exactly which functions
from seq-utils you want using the :only keyword, or if you really want
to use the seq-utils version
you can use refer-clojure and the :exclude keyword. Or, you can use
the :as keyword in the :use form
to qualify the import so that you don't actually replace anything.

If you accidently get this warning and don't want to restart the repl
you can do
(ns-unmap 'your-namespace 'offending-function), fix the naked import,
and reload.

--Robert McIntyre




On Mon, Aug 30, 2010 at 5:54 AM, Chris Jenkins <cdpjenk...@gmail.com> wrote:
> Since I switched to Clojure 1.2, I see an error message whenever I try to
> reload a source file that imports anything. The error message is of the form
> "xxxx already refers to xxx", as though it is complaining that it can't
> import the same thing twice.
> For example, I have a minimal source file that looks like this:
> (ns test.core
>   (:use clojure.contrib.seq-utils))
> I can load it (once!) into the Clojure REPL successfully:
> $ java -cp lib/clojure-contrib-1.2.0.jar:lib/clojure-1.2.0.jar clojure.main
> Clojure 1.2.0
> user=> (load-file "src/test/core.clj")
> WARNING: partition-by already refers to: #'clojure.core/partition-by in
> namespace: test.core, being replaced by:
> #'clojure.contrib.seq-utils/partition-by
> WARNING: frequencies already refers to: #'clojure.core/frequencies in
> namespace: test.core, being replaced by:
> #'clojure.contrib.seq-utils/frequencies
> WARNING: shuffle already refers to: #'clojure.core/shuffle in namespace:
> test.core, being replaced by: #'clojure.contrib.seq-utils/shuffle
> WARNING: reductions already refers to: #'clojure.core/reductions in
> namespace: test.core, being replaced by:
> #'clojure.contrib.seq-utils/reductions
> WARNING: partition-all already refers to: #'clojure.core/partition-all in
> namespace: test.core, being replaced by:
> #'clojure.contrib.seq-utils/partition-all
> WARNING: group-by already refers to: #'clojure.core/group-by in namespace:
> test.core, being replaced by: #'clojure.contrib.seq-utils/group-by
> WARNING: flatten already refers to: #'clojure.core/flatten in namespace:
> test.core, being replaced by: #'clojure.contrib.seq-utils/flatten
> nil
> If I try to reload it then I see an error message:
> user=> (load-file "src/test/core.clj")
> java.lang.IllegalStateException: partition-by already refers to:
> #'clojure.contrib.seq-utils/partition-by in namespace: test.core
> (core.clj:1)
> user=>
> This error message is seen even if I edit the source file and remove the
> (:use ...) clause and then try to load the file again.
> Anyone have any idea what is going on? I didn't see this behaviour in
> Clojure 1.1 and it would be nice if I could find a way to reload files that
> I'm working on.
> Cheers,
> Chris
>
> --
> 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 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

Reply via email to