Btw, I'm using clojure-1.2.0.jar clj-time-0.3.0.jar
- Brad On Sep 8, 5:03 pm, Brad <b...@beaconhill.com> wrote: > I started using the clj-time library and found that it works great. > Only issue I don't understand is this one about extend already refers > to another version of extend. > > It seems that clj-time has a function called extend that conflicts > with the same named function in clojure.core. > > The recommendation online is to put (:refer-clojure :exclude [extend]) > in your ns declaration. I've done this. > > My core.clj file looks like the following: > > (ns test.core > "test project" > (:refer-clojure :exclude (extend)) > (:use clj-time.core)) > > (defn foo > [] > (print "asdf")) > > It sounded like doing this would inside my project use the extend > inside of clj-time.core rather than the clojure one. > > The following two scenarios happen and don't make sense to me. > > The first is I slime-connect to a new swank session. The repl is in > user. I open my test/core.clj file and compile it. When I return to > the repl and (ns test.core) I get a sldb trace which I need to quit. > It has the following complaint: > > extend already refers to: #'clj-time.core/extend in namespace: > test.core > > The second is a variation where I start a new swank session and in the > repl change the name space to test.core (ns test.core). Then I open > test/core.clj and compile it. This time I just a warning printed to > the REPL as follows: > > WARNING: extend already refers to: #'clojure.core/extend in namespace: > test.core, being replaced by: #'clj-time.core/extend > > Can anyone explain what is going on here. I don't quite get it. > > - Brad -- 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