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
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)
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
seancorfield (I'm me on everything :)
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
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
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
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?
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
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.
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
Sweet - mine too! Thanx Andrew!