Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Getting this error regarding duck-streams/spit ...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Victor Olteanu  
View profile  
 More options Oct 25 2010, 10:09 pm
From: Victor Olteanu <bluestar...@gmail.com>
Date: Mon, 25 Oct 2010 22:09:00 -0400
Subject: Getting this error regarding duck-streams/spit ...

Hi friends,

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)

Would you have any idea about how to solve it?

FYI what I have in my datatool/api.clj file is:

(ns datatool.api
  (:use compojure.core)
  (:use hiccup.core)
  (:use hiccup.page-helpers)
  (:use [ring.middleware reload stacktrace file file-info])
  (:use datatool.db)
  (:use clojure.contrib.json)
  (:use clojure.contrib.duck-streams))

Thank you,
Victor


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Ossareh  
View profile  
 More options Oct 25 2010, 10:25 pm
From: Michael Ossareh <ossa...@gmail.com>
Date: Mon, 25 Oct 2010 19:25:57 -0700
Local: Mon, Oct 25 2010 10:25 pm
Subject: Re: Getting this error regarding duck-streams/spit ...

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Victor Olteanu  
View profile  
 More options Oct 25 2010, 10:59 pm
From: Victor Olteanu <bluestar...@gmail.com>
Date: Mon, 25 Oct 2010 22:59:59 -0400
Local: Mon, Oct 25 2010 10:59 pm
Subject: Re: Getting this error regarding duck-streams/spit ...

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Btsai  
View profile  
 More options Oct 26 2010, 12:46 am
From: Btsai <benny.t...@gmail.com>
Date: Mon, 25 Oct 2010 21:46:42 -0700 (PDT)
Local: Tues, Oct 26 2010 12:46 am
Subject: Re: Getting this error regarding duck-streams/spit ...
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:

http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/...
http://clojure.github.com/clojure-contrib/duck-streams-api.html

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Ray  
View profile  
 More options Oct 26 2010, 8:51 am
From: Dave Ray <dave...@gmail.com>
Date: Tue, 26 Oct 2010 08:51:57 -0400
Local: Tues, Oct 26 2010 8:51 am
Subject: Re: Getting this error regarding duck-streams/spit ...
Hey.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean Devlin  
View profile  
 More options Oct 26 2010, 9:39 am
From: Sean Devlin <francoisdev...@gmail.com>
Date: Tue, 26 Oct 2010 06:39:35 -0700 (PDT)
Local: Tues, Oct 26 2010 9:39 am
Subject: Re: Getting this error regarding duck-streams/spit ...
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Victor Olteanu  
View profile  
 More options Oct 26 2010, 2:44 pm
From: Victor Olteanu <bluestar...@gmail.com>
Date: Tue, 26 Oct 2010 14:44:11 -0400
Local: Tues, Oct 26 2010 2:44 pm
Subject: Re: Getting this error regarding duck-streams/spit ...

Thank you Btsai. I checked both
http://richhickey.github.com/clojure-contrib/io-api.html#clojure.cont...
and
http://clojuredocs.org/clojure_contrib/clojure.contrib.duck-streams/s...
and couldn't find any reference to deprecation.
If you can confirm that this deprecation was made "official" then we could
update those docs so other people won't run into these same issues.

Victor


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Btsai  
View profile  
 More options Oct 26 2010, 3:48 pm
From: Btsai <benny.t...@gmail.com>
Date: Tue, 26 Oct 2010 12:48:35 -0700 (PDT)
Local: Tues, Oct 26 2010 3:48 pm
Subject: Re: Getting this error regarding duck-streams/spit ...
I'm fairly positive duck-streams is deprecated, as it is no longer
present in the clojure-contrib git repository:

http://github.com/clojure/clojure-contrib/tree/master/modules/

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.

http://clojure.github.com/clojure-contrib/ is the documentation for
the current 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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Faulhaber  
View profile  
 More options Oct 27 2010, 1:46 am
From: Tom Faulhaber <tomfaulha...@gmail.com>
Date: Tue, 26 Oct 2010 22:46:05 -0700 (PDT)
Local: Wed, Oct 27 2010 1:46 am
Subject: Re: Getting this error regarding duck-streams/spit ...
You remind me that I need to mark http://richhickey.github.com/clojure...
as obsolete and redirect users to the new place.

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Btsai  
View profile  
 More options Oct 27 2010, 2:57 am
From: Btsai <benny.t...@gmail.com>
Date: Tue, 26 Oct 2010 23:57:24 -0700 (PDT)
Local: Wed, Oct 27 2010 2:57 am
Subject: Re: Getting this error regarding duck-streams/spit ...
Awesome!  Thanks for the great work, Tom :)  clojuredocs has quickly
become my go-to reference source.

On Oct 26, 11:46 pm, Tom Faulhaber <tomfaulha...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zkim  
View profile  
 More options Oct 30 2010, 5:59 am
From: zkim <zachary....@gmail.com>
Date: Sat, 30 Oct 2010 02:59:20 -0700 (PDT)
Local: Sat, Oct 30 2010 5:59 am
Subject: Re: Getting this error regarding duck-streams/spit ...
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »