Rogue implicits being clobbered after update to 2.2.0

24 views
Skip to first unread message

Jonathan Ferguson

unread,
Nov 18, 2013, 6:03:46 PM11/18/13
to rogue...@googlegroups.com

Hello, 
   I'm in the process of updating a lift app from Scala 2.9.1 and Lift 2.5.1 to Scala 2.10.x and Lift 2.6-M2 and have run into bunch of what look like implicit errors around date operations. 

   For example,

    "value setTo is not a member of object x$4.created"  when attempting   .modify(_.created setTo DateTime.now()).updateOne(), where created is declared as a DateTimeField
    "value after is not a member of object x$6.when"        when attempting   and (_.when after earliest), where when is declared as a DateTimeField and earliest is a joda DateTime object. 

I'm assuming this is something to do with rogue implicits being clobbered, but I am struggling to see where and/or why.  In most places all that was required was a change of imports  from import com.foursquare.rogue.Rogue._ to import com.foursquare.rogue.LiftRogue._.

If anyone has any suggestions, they would be greatly welcomed. 

Thank you
Jono

Jason Liszka

unread,
Nov 18, 2013, 6:21:43 PM11/18/13
to rogue...@googlegroups.com
As of rogue 2.0 you need to import com.foursquare.rogue.LiftRogue._. There are some generic implicits in com.foursquare.rogue.Rogue, but the Lift-specific ones are in c.f.rogue.LiftRogue.


--
You received this message because you are subscribed to the Google Groups "rogue-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rogue-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Ferguson

unread,
Nov 18, 2013, 6:49:22 PM11/18/13
to rogue...@googlegroups.com
Yup, I'm importing LiftRouge._

Jono

Jorge Ortiz

unread,
Nov 19, 2013, 1:58:14 PM11/19/13
to rogue...@googlegroups.com
If you're upgrading from Rogue pre-2.0 to Rogue post-2.0, then we made a bunch of changes to make Rogue Lift-agnostic.

As a consequence, rogue-core (where the Rogue object is defined) no longer has a dependency on Lift (with the exception of lift-json, I believe). All that code has moved to rogue-lift, which now defines a LiftRogue object.

Importing LiftRogue._ should be sufficient for all your rogue implicit needs. You can also mix the LiftRogue trait into an object in your own code that you already import for implicits.


Reply all
Reply to author
Forward
0 new messages