Anyone managed a 2.10.0 casbah build?

783 views
Skip to first unread message

tigerfoot

unread,
Jul 27, 2012, 6:35:18 PM7/27/12
to mongodb-ca...@googlegroups.com
Anyone managed a 2.10.0 casbah build?  I'm trying... unraveling the chain of dependencies, some of which have 2.10.0 builds, others not.
Before I went down this path very far I was wondering if anyone else had already accomplished it.

Cheers,
Greg

Brendan McAdams

unread,
Jul 27, 2012, 6:56:25 PM7/27/12
to mongodb-ca...@googlegroups.com
Not that I know of. my focus has been on the upcoming MomgoDB release so I haven't had a chance to dig into 2.10 yet.

-b

aleks....@gmail.com

unread,
Oct 22, 2012, 8:24:12 AM10/22/12
to mongodb-ca...@googlegroups.com

Any updates on this?

Brendan W. McAdams

unread,
Oct 24, 2012, 5:12:59 AM10/24/12
to mongodb-ca...@googlegroups.com, aleks....@gmail.com
Until 2.10 is released along with any necessary dependencies, it is unlikely there will be a Casbah release for 2.10, as I believe binary compatibility is changing for 2.10.

bernhard...@gmail.com

unread,
Nov 5, 2012, 3:07:10 AM11/5/12
to mongodb-ca...@googlegroups.com, aleks....@gmail.com
Hi,

Greg, I'd be interested in knowing whether you've gotten any further on this.

2.10.0-RC1 is out, and I only have had a quick look at the Casbah build but so far I've only spotted as potentially problematic dependencies scalaj-collection (wondering whether that couldn't be covered by scala.collections.JavaConverters._) and org.scala-tools.time. For the rest AFAIK they're covered (specs2 [1] and scala-test [2] both have builds against 2.10.0-RC1). I haven't managed to figure out who's the author of org.scala-tools.time, does anybody know?

Thanks,

Manuel

[1] https://oss.sonatype.org/content/repositories/releases/org/specs2/specs2_2.10.0-RC1/1.12.2/
[2] https://oss.sonatype.org/content/groups/public/org/scalatest/scalatest_2.10.0-RC1/1.8-B3/

Brendan W. McAdams

unread,
Nov 5, 2012, 7:58:20 AM11/5/12
to mongodb-ca...@googlegroups.com
It is possible that JavaConverters might be an acceptable substitute.  Although it is based on an old branch of scalaj-Collections it should cover everything needed.

The big downside is that to transition the build to support JavaConverters we need to fully drop support for Scala 2.8.x, or maintain branches which I am loathe to do.  That or whip up some adapter code.

Thoughts?


--



bernhard...@gmail.com

unread,
Nov 7, 2012, 1:14:16 AM11/7/12
to mongodb-ca...@googlegroups.com
Do you know of people still using 2.8.x and can't upgrade to a newer version because of some other libraries or frameworks? I would imagine that this could be an issue because I faced it while being stuck with 2.8.x on play-scala (the precursor of today's Play 2). That being said, I'd imagine that most environments in which Casbah is made use of are somehow related to the web world or to containers / micro-kernels that have evolved beyond 2.8.x - at least all the big ones have, AFAIK.

So I'd opt for dropping support for Scala 2.8.x, which probably should also simplify things code-wise.

Manuel
Message has been deleted

Brendan W. McAdams

unread,
Nov 16, 2012, 5:18:41 PM11/16/12
to mongodb-ca...@googlegroups.com
The Query DSL is the last blocker on the release; I've been back on the road and this coming week apart from Scala Exchange am clear and plan to finish.

I also have to strip scalaj and 2.8 support :)


On Fri, Nov 16, 2012 at 11:15 PM, <taylor...@gmail.com> wrote:
Hey guys,

Earlier tonight I wanted to play around with Play2.1, which uses Scala 2.10, and I ran into issues because Casbah wasn't built yet against Scala 2.10.

I found this thread and you guys inspired me to take a shot at building it myself.  Ultimately, it worked! I was able to get my Play2.1 app working with Mongo + Casbah_210.

In case anyone else wants to try building Casbah with 2.10 before official support is offered by the Casbah team, here's what to do:

1) clone my repo: https://github.com/tmingos/casbah
2) Make sure you have sbt installed (if you use homebrew... brew install sbt)
3) navigate to the directory where you cloned the repo
4) In your shell, type
   ./sbt -210
(note: this is to call a script called sbt, NOT the sbt console so don't forget the "./")
5) you can type "test" to run the tests. Only a few fail on my machine. I belive they are failing in the main Casbah repo as well, but I haven't had time to cofirm. The failing tests are related to the new  AggregationFramework support and query dsl.
5) type "publish-local" to  publish the Casbah jars to your local repo (~/.ivy2/, etc.)

I was then able to add to my Play Framework 2.1 project as an app dependency.

Anyways, hope that helps anyone else eager to play with Casbah and 2.10 ;)

Taylor

--



taylor...@gmail.com

unread,
Nov 16, 2012, 5:19:31 PM11/16/12
to mongodb-ca...@googlegroups.com
Hey guys,

Earlier tonight I wanted to play around with Play2.1, which uses Scala 2.10, and I ran into problems because Casbah isn't yet built against Scala 2.10.

I found this thread and you guys inspired me to take a shot at building it myself. Ultimately, it worked! I was able to get my Play2.1 app working with Mongo + Casbah_210.

In case anyone else wants to try building Casbah with 2.10 before official support is offered by the Casbah team, here's what to do:

1) Clone my repo: https://github.com/tmingos/casbah

2) Make sure you have sbt installed (if you use homebrew... brew install sbt)

3) Navigate to the directory where you cloned the repo


4) In your shell, type
./sbt -210
(note: this is to call a script called sbt, NOT the sbt console so don't forget the "./")

5) You can type "test" to run the tests. Only a few fail on my machine. I belive they are failing in the main Casbah repo as well. I haven't had time to confirm this, however. The failing tests are related to the new AggregationFramework support and query dsl.
5) Type "publish-local" to publish the Casbah jars to your local repo (~/.ivy2/, etc.)

I was then able to add the local repo casbah artifacts to my Play Framework 2.1 project.

Anyways, I hope this helps anyone else eager to play with Casbah and 2.10 ;)

Taylor

Manuel Bernhardt

unread,
Nov 20, 2012, 8:14:15 AM11/20/12
to mongodb-ca...@googlegroups.com
Hi,

Taylor, this looks really good. Looking forward to the new release!

Manuel

-- 
Manuel Bernhardt

--

fer83

unread,
Dec 16, 2012, 12:41:44 PM12/16/12
to mongodb-ca...@googlegroups.com
Why do you need to use the script ./sbt -210 instead of standard sbt -210?

Taylor Mingos

unread,
Dec 18, 2012, 7:37:38 PM12/18/12
to mongodb-ca...@googlegroups.com
I'm still not exactly clear why there is a sbt runner that is (confusingly) also called sbt as part of the casbah project. You can view the source code and justification from author here:
https://github.com/mongodb/casbah/blob/master/sbt

BTW, since scala 2.10 support was pulled in to the official casbah github repo yesterday, my fork is now obsolete and I removed it to prevent confusion. The published 2.10 build artifact is still in Sonatype for those that are using it.

Here's a link to the official casbah repository branch with 2.10 support => https://github.com/mongodb/casbah/tree/master

--



ross....@gmail.com

unread,
Dec 19, 2012, 3:50:30 AM12/19/12
to mongodb-ca...@googlegroups.com
The sbt file provided is a rebel cut version (sbt-extras) it allows for easier management of cross scala versions and managing their dependencies.

Theres one issue with JavaConverters acting different to scalaj ones - once thats fixed we should be good to go.

Ross

mike....@gmail.com

unread,
Dec 19, 2012, 10:40:29 PM12/19/12
to mongodb-ca...@googlegroups.com
Hey Taylor,

Any chance you have a sample app for getting this running with Play?

I'm new to Scala and Play and would love to see it.

Thanks,
Mike

Taylor Mingos

unread,
Dec 23, 2012, 2:17:54 AM12/23/12
to mongodb-ca...@googlegroups.com
Mike,

Not for Play 2.1-RC1 and this build of Casbah (against Scala 2.10).

However, for Play 2.0.4 (the current production version of the framework), there is a sample app that illustrates basic querying and persistence to mongodb using Salat/Casbah here: https://github.com/leon/play-salat/tree/master/sample

You can also follow Leon's instructions on the repo's main page (https://github.com/leon/play-salat/) and set up your own Play 2.0.4 app from scratch with Salat/Casbah mongodb support.

Hope that helps! 

-Taylor

--



Reply all
Reply to author
Forward
0 new messages