I am getting the following error and was hoping somebody may be able to assist:
java.lang.IllegalStateException: spit already refers to: #'clojure.contrib.duck-streams/spit in namespace: datatool.api (api.clj:1)
I realized it's because clojure.contrib.duck-streams/spit is overriding clojure.core/spit. It used to be just a warning when I start jetty, but now it is preventing my app to run. (jetty starts, but when I try accessing the app in the browser, I get that error)
The following statement worked for me: (:require [clojure.contrib.duck-streams :as d])
As I was using slurp and slurp*, I then had to do the following:
use the form "d/slurp*" instead (prefixed with d/) use "slurp" without a change
This brings up a related point - I can see that there are functions with the same name in different packages, which I believe it's quite unfortunate. There is slurp in clojure.core and there is duck-streams/slurp* , along with other functions such as spit...
I hope this kind of things might be addressed in future versions of Clojure...
On Mon, Oct 25, 2010 at 10:25 PM, Michael Ossareh <ossa...@gmail.com> wrote:
> On Mon, Oct 25, 2010 at 19:09, Victor Olteanu <bluestar...@gmail.com>wrote:
>> java.lang.IllegalStateException: spit already refers to: >> #'clojure.contrib.duck-streams/spit in namespace: datatool.api (api.clj:1)
> Hi Victor,
> I solved this issue by using (require) instead of (use). i.e.
> (ns myapp > (require [other-ns :as ns]))
> Then whenever you access a function in the other-ns you prefix it with > ns/function.
> There may be other ways to solve this though.
> -- > 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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com > > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en
I don't think it's a mistake or accident that spit exists in
clojure.core. In 1.2, duck-streams became deprecated and functions
such as spit were incorporated into clojure.core:
> The following statement worked for me:
> (:require [clojure.contrib.duck-streams :as d])
> As I was using slurp and slurp*, I then had to do the following:
> use the form "d/slurp*" instead (prefixed with d/)
> use "slurp" without a change
> This brings up a related point - I can see that there are functions with the
> same name in different packages, which I believe it's quite unfortunate.
> There is slurp in clojure.core and there is duck-streams/slurp* , along with
> other functions such as spit...
> I hope this kind of things might be addressed in future versions of
> Clojure...
Until this message, I hadn't noticed that duck-streams was deprecated. Is the stuff in clojure.java.io the "official" replacement for that functionality? So now rather than duck-streams/read-lines, I'd manually combine with-open, clojure.java.io/reader, and line-seq?
On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote: > I don't think it's a mistake or accident that spit exists in > clojure.core. In 1.2, duck-streams became deprecated and functions > such as spit were incorporated into clojure.core:
> Are you using anything beyond spit and slurp*? If not, I think you > can switch to clojure.core's slurp and spit and drop duck-streams > altogether.
> On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote: >> Thank you.
>> The following statement worked for me: >> (:require [clojure.contrib.duck-streams :as d])
>> As I was using slurp and slurp*, I then had to do the following:
>> use the form "d/slurp*" instead (prefixed with d/) >> use "slurp" without a change
>> This brings up a related point - I can see that there are functions with the >> same name in different packages, which I believe it's quite unfortunate. >> There is slurp in clojure.core and there is duck-streams/slurp* , along with >> other functions such as spit...
>> I hope this kind of things might be addressed in future versions of >> Clojure...
> -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en
The stuff in Clojure.java.io would be the preferred tool, yes.
However, if contrib has something that solves your problem, go ahead
and use it. Be careful though, because contrib is much more likely to
change than something officially in core.
On Oct 26, 8:51 am, Dave Ray <dave...@gmail.com> wrote:
> Until this message, I hadn't noticed that duck-streams was deprecated.
> Is the stuff in clojure.java.io the "official" replacement for that
> functionality? So now rather than duck-streams/read-lines, I'd
> manually combine with-open, clojure.java.io/reader, and line-seq?
> Just checking.
> Thanks,
> Dave
> On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote:
> > I don't think it's a mistake or accident that spit exists in
> > clojure.core. In 1.2, duck-streams became deprecated and functions
> > such as spit were incorporated into clojure.core:
> > Are you using anything beyond spit and slurp*? If not, I think you
> > can switch to clojure.core's slurp and spit and drop duck-streams
> > altogether.
> > On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> >> Thank you.
> >> The following statement worked for me:
> >> (:require [clojure.contrib.duck-streams :as d])
> >> As I was using slurp and slurp*, I then had to do the following:
> >> use the form "d/slurp*" instead (prefixed with d/)
> >> use "slurp" without a change
> >> This brings up a related point - I can see that there are functions with the
> >> same name in different packages, which I believe it's quite unfortunate.
> >> There is slurp in clojure.core and there is duck-streams/slurp* , along with
> >> other functions such as spit...
> >> I hope this kind of things might be addressed in future versions of
> >> Clojure...
> > --
> > 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+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en
On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote: > I don't think it's a mistake or accident that spit exists in > clojure.core. In 1.2, duck-streams became deprecated and functions > such as spit were incorporated into clojure.core:
> Are you using anything beyond spit and slurp*? If not, I think you > can switch to clojure.core's slurp and spit and drop duck-streams > altogether.
> On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote: > > Thank you.
> > The following statement worked for me: > > (:require [clojure.contrib.duck-streams :as d])
> > As I was using slurp and slurp*, I then had to do the following:
> > use the form "d/slurp*" instead (prefixed with d/) > > use "slurp" without a change
> > This brings up a related point - I can see that there are functions with > the > > same name in different packages, which I believe it's quite unfortunate. > > There is slurp in clojure.core and there is duck-streams/slurp* , along > with > > other functions such as spit...
> > I hope this kind of things might be addressed in future versions of > > Clojure...
> -- > 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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com > > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en
http://richhickey.github.com/clojure-contrib/ doesn't have the
deprecation info most likely because it is the documentation for the
original (now outdated) clojure-contrib repository, and doesn't have
1.2 info.
> On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote:
> > I don't think it's a mistake or accident that spit exists in
> > clojure.core. In 1.2, duck-streams became deprecated and functions
> > such as spit were incorporated into clojure.core:
> > Are you using anything beyond spit and slurp*? If not, I think you
> > can switch to clojure.core's slurp and spit and drop duck-streams
> > altogether.
> > On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > > Thank you.
> > > The following statement worked for me:
> > > (:require [clojure.contrib.duck-streams :as d])
> > > As I was using slurp and slurp*, I then had to do the following:
> > > use the form "d/slurp*" instead (prefixed with d/)
> > > use "slurp" without a change
> > > This brings up a related point - I can see that there are functions with
> > the
> > > same name in different packages, which I believe it's quite unfortunate.
> > > There is slurp in clojure.core and there is duck-streams/slurp* , along
> > with
> > > other functions such as spit...
> > > I hope this kind of things might be addressed in future versions of
> > > Clojure...
> > --
> > 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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com >
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en
Zack Kim and I are working to have clojuredocs pull data from the
autodoc system and, at that point, I assume that he'll add deprecation
info over there as well.
Sorry for any confusion! Clojure's still a fast moving target.
Tom
On Oct 26, 12:48 pm, Btsai <benny.t...@gmail.com> wrote:
> http://richhickey.github.com/clojure-contrib/doesn't have the
> deprecation info most likely because it is the documentation for the
> original (now outdated) clojure-contrib repository, and doesn't have
> 1.2 info.
> clojuredocs should probably be updated to include the deprecation
> info, and also have its link to clojure-contrib point to the current
> repository.
> On Oct 26, 12:44 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote:
> > > I don't think it's a mistake or accident that spit exists in
> > > clojure.core. In 1.2, duck-streams became deprecated and functions
> > > such as spit were incorporated into clojure.core:
> > > Are you using anything beyond spit and slurp*? If not, I think you
> > > can switch to clojure.core's slurp and spit and drop duck-streams
> > > altogether.
> > > On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > > > Thank you.
> > > > The following statement worked for me:
> > > > (:require [clojure.contrib.duck-streams :as d])
> > > > As I was using slurp and slurp*, I then had to do the following:
> > > > use the form "d/slurp*" instead (prefixed with d/)
> > > > use "slurp" without a change
> > > > This brings up a related point - I can see that there are functions with
> > > the
> > > > same name in different packages, which I believe it's quite unfortunate.
> > > > There is slurp in clojure.core and there is duck-streams/slurp* , along
> > > with
> > > > other functions such as spit...
> > > > I hope this kind of things might be addressed in future versions of
> > > > Clojure...
> > > --
> > > 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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com >
> > > For more options, visit this group at
> > >http://groups.google.com/group/clojure?hl=en
> Zack Kim and I are working to have clojuredocs pull data from the
> autodoc system and, at that point, I assume that he'll add deprecation
> info over there as well.
> Sorry for any confusion! Clojure's still a fast moving target.
> Tom
> On Oct 26, 12:48 pm, Btsai <benny.t...@gmail.com> wrote:
> > I'm fairly positive duck-streams is deprecated, as it is no longer
> > present in the clojure-contrib git repository:
> > clojuredocs should probably be updated to include the deprecation
> > info, and also have its link to clojure-contrib point to the current
> > repository.
> > On Oct 26, 12:44 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > > On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote:
> > > > I don't think it's a mistake or accident that spit exists in
> > > > clojure.core. In 1.2, duck-streams became deprecated and functions
> > > > such as spit were incorporated into clojure.core:
> > > > Are you using anything beyond spit and slurp*? If not, I think you
> > > > can switch to clojure.core's slurp and spit and drop duck-streams
> > > > altogether.
> > > > On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > > > > Thank you.
> > > > > The following statement worked for me:
> > > > > (:require [clojure.contrib.duck-streams :as d])
> > > > > As I was using slurp and slurp*, I then had to do the following:
> > > > > use the form "d/slurp*" instead (prefixed with d/)
> > > > > use "slurp" without a change
> > > > > This brings up a related point - I can see that there are functions with
> > > > the
> > > > > same name in different packages, which I believe it's quite unfortunate.
> > > > > There is slurp in clojure.core and there is duck-streams/slurp* , along
> > > > with
> > > > > other functions such as spit...
> > > > > I hope this kind of things might be addressed in future versions of
> > > > > Clojure...
> > > > --
> > > > 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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com >
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/clojure?hl=en
Looks like I'm a bit late to the party on this one.
ClojureDocs, as Tom mentioned, dosen't currently track the :deprecated
metadata entry, which will be fixed once clojuredocs is able to
consume autodoc's output.
Apologies for the confusion.
-Zack
On Oct 27, 12:57 am, Btsai <benny.t...@gmail.com> wrote:
> > Zack Kim and I are working to have clojuredocs pull data from the
> > autodoc system and, at that point, I assume that he'll add deprecation
> > info over there as well.
> > Sorry for any confusion! Clojure's still a fast moving target.
> > Tom
> > On Oct 26, 12:48 pm, Btsai <benny.t...@gmail.com> wrote:
> > > I'm fairly positive duck-streams is deprecated, as it is no longer
> > > present in the clojure-contrib git repository:
> > > clojuredocs should probably be updated to include the deprecation
> > > info, and also have its link to clojure-contrib point to the current
> > > repository.
> > > On Oct 26, 12:44 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > > > On Tue, Oct 26, 2010 at 12:46 AM, Btsai <benny.t...@gmail.com> wrote:
> > > > > I don't think it's a mistake or accident that spit exists in
> > > > > clojure.core. In 1.2, duck-streams became deprecated and functions
> > > > > such as spit were incorporated into clojure.core:
> > > > > Are you using anything beyond spit and slurp*? If not, I think you
> > > > > can switch to clojure.core's slurp and spit and drop duck-streams
> > > > > altogether.
> > > > > On Oct 25, 8:59 pm, Victor Olteanu <bluestar...@gmail.com> wrote:
> > > > > > Thank you.
> > > > > > The following statement worked for me:
> > > > > > (:require [clojure.contrib.duck-streams :as d])
> > > > > > As I was using slurp and slurp*, I then had to do the following:
> > > > > > use the form "d/slurp*" instead (prefixed with d/)
> > > > > > use "slurp" without a change
> > > > > > This brings up a related point - I can see that there are functions with
> > > > > the
> > > > > > same name in different packages, which I believe it's quite unfortunate.
> > > > > > There is slurp in clojure.core and there is duck-streams/slurp* , along
> > > > > with
> > > > > > other functions such as spit...
> > > > > > I hope this kind of things might be addressed in future versions of
> > > > > > Clojure...
> > > > > --
> > > > > 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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com >
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/clojure?hl=en