Hi,

Am 30.08.2010 um 20:43 schrieb Chris Jenkins:

> How would using the :only keyword help here? Just to be clear, the problem 
> here is that attempting to load my source file the second time fails (loading 
> the first time having succeeded, albeit with a few warnings about replacing 
> symbols from clojure.core), which makes it very difficult for me to use 
> swank-clojure, for example, because I can't hit C-c C-k twice on the same 
> file.
> 
> Here is the failure when I try to load the file for the second time:
> 
> java.lang.IllegalStateException: partition-by already refers to: 
> #'clojure.contrib.seq-utils/partition-by in namespace: test.core (core.clj:1)
> 
> So here's my main question: If I'm working in the REPL and I edit a file that 
> I've previously loaded, how can I cause the file to be reloaded without 
> hitting that error? If my .clj file doesn't :use any other clojure modules 
> then reloading works fine but, if it imports anything, then the second 
> (load-file...) fails.

:only helps insofar, that you can say (:use [clojure.contrib.seq-utils :only 
(some thing-else)]). This will prevent partition-by from being loaded form 
seq-utils in the first place. Nothing bad happens. Similar you can say 
(:refer-clojure :exclude (partition-by)]). This will prevent partition-by being 
loaded from core. Both solutions will work. However you will probably want to 
switch your code to use the core version of partition-by.

Sincerely
Meikel

-- 
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