Clojure 1.3 Support

90 views
Skip to first unread message

dj_unforgetable

unread,
Mar 22, 2011, 11:43:49 AM3/22/11
to congomongo-dev
Hi folks,

What's the plan for Congo Mongo and clojure 1.3 support? I have an
application currently using clojure and clojure-contrib 1.3 but can't
use congo mongo from maven due to it's dependency on clojure/clojure-
contrib 1.2. Is it safe to use with the latest clojure version?

Thanks!

- Prashanth

Sean Corfield

unread,
Jun 9, 2011, 4:27:19 PM6/9/11
to congomo...@googlegroups.com
I'm going to bump this thread because our system at work (World Singles) requires Clojure 1.3 and right now we can't use the maven builds of CongoMongo. I may try to create a 1.3-compatible version just because we need it but if official support for 1.3 is "coming soon" I don't want to duplicate effort.

Sean

Steve Purcell

unread,
Jun 9, 2011, 5:16:54 PM6/9/11
to congomo...@googlegroups.com
Nope -- since congomongo is largely without a project lead, there's no
official plan to add support for clojure 1.3, so if you're the first to
do so, it'll be your patches that will likely get merged in by me or one
of the other committers.

In fact, we could probably just ask Andrew to add you to the list of
committers.

What are the key issues in getting congomongo to work properly with 1.3?

-Steve

Sean Corfield

unread,
Jun 10, 2011, 1:21:56 AM6/10/11
to congomo...@googlegroups.com
On Thu, Jun 9, 2011 at 2:16 PM, Steve Purcell <st...@sanityinc.com> wrote:
> Nope -- since congomongo is largely without a project lead, there's no
> official plan to add support for clojure 1.3, so if you're the first to
> do so, it'll be your patches that will likely get merged in by me or one
> of the other committers.

Good to know!

> In fact, we could probably just ask Andrew to add you to the list of
> committers.

Happy to step up and do that. Thank you!

> What are the key issues in getting congomongo to work properly with 1.3?

Mostly it's the "old contrib" dependencies since parts of contrib
1.2.0 won't run on Clojure 1.3.0 as far as I can tell (I didn't spend
much time looking at yet).

Here's what I get trying to use somnium.congomongo under 1.3.0:

project.clj dependencies:

:dependencies [[org.clojure/clojure "1.3.0-alpha8"]
[congomongo "0.1.4-SNAPSHOT"]])

REPL session:

sean@sean-netbook:~/seven/clojure/scratch$ lein repl
Warning: *classpath* not declared dynamic and thus is not dynamically
rebindable, but its name suggests otherwise. Please either indicate
^:dynamic *classpath* or change the name.
REPL started; server listening on localhost:50025.
user=> (use 'somnium.congomongo)
Warning: *mongo-config* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *mongo-config* or change the name.
Warning: *default-page-width* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *default-page-width* or change the name.
Warning: *print-pretty* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-pretty* or change the name.
Warning: *print-pprint-dispatch* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-pprint-dispatch* or change the name.
Warning: *print-pprint-dispatch* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-pprint-dispatch* or change the name.
Warning: *print-right-margin* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-right-margin* or change the name.
Warning: *print-miser-width* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-miser-width* or change the name.
Warning: *print-lines* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-lines* or change the name.
Warning: *print-circle* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-circle* or change the name.
Warning: *print-shared* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-shared* or change the name.
Warning: *print-suppress-namespaces* not declared dynamic and thus is
not dynamically rebindable, but its name suggests otherwise. Please
either indicate ^:dynamic *print-suppress-namespaces* or change the
name.
Warning: *print-radix* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *print-radix* or change the name.
Warning: *print-base* not declared dynamic and thus is not dynamically
rebindable, but its name suggests otherwise. Please either indicate
^:dynamic *print-base* or change the name.
Warning: *current-level* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *current-level* or change the name.
Warning: *current-length* not declared dynamic and thus is not
dynamically rebindable, but its name suggests otherwise. Please either
indicate ^:dynamic *current-length* or change the name.
Warning: *format-str* not declared dynamic and thus is not dynamically
rebindable, but its name suggests otherwise. Please either indicate
^:dynamic *format-str* or change the name.
CompilerException java.lang.IllegalStateException: Can't dynamically
bind non-dynamic var: clojure.contrib.pprint/*format-str*,
compiling:(dispatch.clj:90)
user=>

Since the new modular contrib libraries should all work with Clojure
1.2.x, we might be able to change the dependencies to those if the
relevant functions have been migrated...

I'll start looking into it this weekend if I get a chance.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Steve Purcell

unread,
Jun 10, 2011, 3:18:03 AM6/10/11
to congomo...@googlegroups.com
Sean Corfield <seanco...@gmail.com> writes:
> On Thu, Jun 9, 2011 at 2:16 PM, Steve Purcell <st...@sanityinc.com> wrote:
>> Nope -- since congomongo is largely without a project lead, there's no
>> official plan to add support for clojure 1.3, so if you're the first to
>> do so, it'll be your patches that will likely get merged in by me or one
>> of the other committers.
>
> Good to know!
>
>> In fact, we could probably just ask Andrew to add you to the list of
>> committers.
>
> Happy to step up and do that. Thank you!

Ping me with your github ID please, and I'll send a message to Andrew
(assuming that he's not actively reading this list these days).


>> What are the key issues in getting congomongo to work properly with 1.3?
>
> Mostly it's the "old contrib" dependencies since parts of contrib
> 1.2.0 won't run on Clojure 1.3.0 as far as I can tell (I didn't spend
> much time looking at yet).

Okay.

> Here's what I get trying to use somnium.congomongo under 1.3.0:

> user=> (use 'somnium.congomongo)
> Warning: *mongo-config* not declared dynamic and thus is not
> dynamically rebindable, but its name suggests otherwise. Please either
> indicate ^:dynamic *mongo-config* or change the name.
> Warning: *default-page-width* not declared dynamic and thus is not
> dynamically rebindable, but its name suggests otherwise. Please either
> indicate ^:dynamic *default-page-width* or change the name.
> Warning: *print-pretty* not declared dynamic and thus is not

> ... snip ...

Could be worse!

It would be fine to move / re-work / wrap *mongo-config* as necessary, IMO.


> Since the new modular contrib libraries should all work with Clojure
> 1.2.x, we might be able to change the dependencies to those if the
> relevant functions have been migrated...

Great, I was thinking the same thing.

-Steve

Sean Corfield

unread,
Jun 10, 2011, 4:03:20 AM6/10/11
to congomo...@googlegroups.com
On Fri, Jun 10, 2011 at 12:18 AM, Steve Purcell <st...@sanityinc.com> wrote:
> Ping me with your github ID please, and I'll send a message to Andrew
> (assuming that he's not actively reading this list these days).

seancorfield (I'm me on everything :)

Sean Corfield

unread,
Jun 10, 2011, 5:28:43 PM6/10/11
to congomo...@googlegroups.com
On Thu, Jun 9, 2011 at 10:21 PM, Sean Corfield <seanco...@gmail.com> wrote:
> Mostly it's the "old contrib" dependencies since parts of contrib
> 1.2.0 won't run on Clojure 1.3.0 as far as I can tell (I didn't spend
> much time looking at yet).

I'm a good way thru these updates but wanted to ping the group about
one fairly large change...

defnk is not in the new contrib libraries so the alternative is (defn
name "docs" [pos1 pos2 & {:keys [kw1 kw2] :or {kw2 default-value}}]
body)

I can understand the resistance to the duplication of keywords - and
this change needs to be made to a lot of functions in the main
congomongo.clj file - but I'd like to go ahead and make this change
now, and I'll go back to clojure-dev and raise the issue of defnk
again to see if folks want it in the new contrib libraries (searching
the list archives, I've seen resistance to adding defnk because of the
built-in support for keyword arguments).

Steve Purcell

unread,
Jun 10, 2011, 6:04:50 PM6/10/11
to congomo...@googlegroups.com
Sounds reasonable to me.

-Steve

Sean Corfield

unread,
Jun 10, 2011, 7:48:09 PM6/10/11
to congomo...@googlegroups.com
My changes have been pushed.

I tested with both Clojure 1.2.1 and Clojure 1.3.0-alpha8 - all tests
pass. Note the dependencies on the new Clojure contrib libraries
core.incubator (for seqable?) and data.json (for all the JSON stuff).

Summary of code changes for Clojure 1.3.0 compatibility:
* earmuffed vars must be marked dynamic
* 1.0 != 1 so various tests were updated to use float values (in
Clojure 1.3.0, numerics of different native types are no longer equal)
* defnk usage replaced by map destructuring in arguments

Let me know if I broke anything for anyone!

Does this warrant a 0.1.5 release?

Sean

Steve Purcell

unread,
Jun 11, 2011, 4:02:52 AM6/11/11
to congomo...@googlegroups.com
Sean Corfield <seanco...@gmail.com> writes:
> My changes have been pushed.

Great! Thanks for that.

> I tested with both Clojure 1.2.1 and Clojure 1.3.0-alpha8 - all tests
> pass.

The existing tests aren't as extensive as they could be, but that's
still a good sign! ;-)

> Note the dependencies on the new Clojure contrib libraries
> core.incubator (for seqable?) and data.json (for all the JSON stuff).
>
> Summary of code changes for Clojure 1.3.0 compatibility:
> * earmuffed vars must be marked dynamic
> * 1.0 != 1 so various tests were updated to use float values (in
> Clojure 1.3.0, numerics of different native types are no longer equal)

Wow, hadn't heard that... I'm going to have fun upgrading one of my own apps...

> * defnk usage replaced by map destructuring in arguments
>
> Let me know if I broke anything for anyone!
>
> Does this warrant a 0.1.5 release?

I've bumped the version, but we have no process right now for cutting
official release tarballs because only Andrew has access to the somnium
clojars group.

-Steve

Sean Corfield

unread,
Jun 24, 2011, 10:07:22 PM6/24/11
to congomo...@googlegroups.com
On Sat, Jun 11, 2011 at 1:02 AM, Steve Purcell <st...@sanityinc.com> wrote:
> Sean Corfield <seanco...@gmail.com> writes:
>> Does this warrant a 0.1.5 release?
> I've bumped the version, but we have no process right now for cutting
> official release tarballs because only Andrew has access to the somnium
> clojars group.

FWIW, since we (World Singles) are now at a point where we are
starting to need other developers on our team to be able to use this
updated library and we don't have a maven repo of our own, I pushed
org.clojars.seancorfield/congomongo 0.1.5-SNAPSHOT to Clojars. I know
this is somewhat frowned on but there seem to be a bunch of alternate
deployments on Clojars already so I figured it wouldn't make it too
much worse... It seems a shame we can't get regular releases of
CongoMongo pushed somewhere public?

Steve Purcell

unread,
Jun 25, 2011, 5:48:19 AM6/25/11
to congomo...@googlegroups.com
On 25 Jun 2011, at 03:07, Sean Corfield wrote:
> ... It seems a shame we can't get regular releases of
> CongoMongo pushed somewhere public?


Yep. IIRC, Andrew corresponded with Ato a long time ago about a clojars
bug which prevented him from adding further members to the group, thus
allowing us maintainers to push official jars.

I guess that since Andrew's no longer actively involved in maintaining
congomongo, resolving that issue isn't high on his todo list.

-Steve


Sean Corfield

unread,
Jun 25, 2011, 7:29:57 PM6/25/11
to congomo...@googlegroups.com
On Sat, Jun 25, 2011 at 2:48 AM, Steve Purcell <st...@sanityinc.com> wrote:
> I guess that since Andrew's no longer actively involved in maintaining
> congomongo, resolving that issue isn't high on his todo list.

Andrew pinged me off-list and has pushed the 0.1.5-SNAPSHOT to the
CongoMongo group on Clojars (thank you!).

He's also chasing up on Clojars to get the issue addressed so
additional people can push JARs.

Steve Purcell

unread,
Jun 26, 2011, 3:34:27 AM6/26/11
to congomo...@googlegroups.com
That's great news!

somnium

unread,
Jun 26, 2011, 5:48:34 PM6/26/11
to congomongo-dev
Ok, the Clojars bottleneck should be resolved now.
Let me know if any issues remain.

Steve Purcell

unread,
Jun 27, 2011, 4:56:44 AM6/27/11
to congomo...@googlegroups.com
somnium <boek...@gmail.com> writes:
> Ok, the Clojars bottleneck should be resolved now.
> Let me know if any issues remain.


Yay - now 'congomongo' shows up in my list of clojars groups. Thanks
for chasing that up, Andrew - it'll make things much easier going
forward.

-Steve

Sean Corfield

unread,
Jun 27, 2011, 7:43:58 PM6/27/11
to congomo...@googlegroups.com
On Mon, Jun 27, 2011 at 1:56 AM, Steve Purcell <st...@sanityinc.com> wrote:
> Yay - now 'congomongo' shows up in my list of clojars groups. Thanks
> for chasing that up, Andrew - it'll make things much easier going
> forward.

Sweet - mine too! Thanx Andrew!

Reply all
Reply to author
Forward
0 new messages