JsRaw change with Lift 2.5 or Scala 2.10

113 views
Skip to first unread message

Dave Briccetti

unread,
May 19, 2013, 11:44:28 PM5/19/13
to lif...@googlegroups.com
Hi all. I’m finally updating a large project I work on to Lift 2.5 and Scala 2.10. I’m getting quite a few errors like this:

[error]  found   : net.liftweb.http.js.JE.JsRaw
[error]  required: net.liftweb.http.js.JsCmd
[error]   def x = Script(JsRaw("var x = [" +


David Pollak

unread,
May 19, 2013, 11:48:47 PM5/19/13
to liftweb
The 2.10 implicit resolution mechanism got changed. The implicit conversion from JsExp to JsCmd sometimes doesn't get picked up. Sigh.




--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net

Dave Briccetti

unread,
May 20, 2013, 12:00:55 AM5/20/13
to lif...@googlegroups.com
Workaround suggestions? I also get this:

value & is not a member of net.liftweb.http.js.JE.JsRaw
[error]     JsRaw("...") & Foo.method
[error]                  ^

and this:

[error]  found   : net.liftweb.http.js.JE.JsRaw
[error]  required: net.liftweb.http.js.JsCmd
[error]       foldLeft(Noop)(_ & _)
[error]                          ^

Diego Medina

unread,
May 20, 2013, 12:17:44 AM5/20/13
to Lift
iirc, try

myJsRawVal.cmd to make it a JsCmd (adding .cmd)

Thanks

  Diego


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://fmpwizard.telegr.am

Dave Briccetti

unread,
May 20, 2013, 1:31:52 AM5/20/13
to lif...@googlegroups.com
Hi Diego. That seems to be working. Thanks.

Naftoli Gugenheim

unread,
May 20, 2013, 3:51:21 PM5/20/13
to liftweb
Sometimes? At random?

Dave Briccetti

unread,
May 21, 2013, 12:02:25 AM5/21/13
to lif...@googlegroups.com
Say what? Add .cmd after all my JsRaw(...)s made it work again.

On Monday, May 20, 2013 12:51:21 PM UTC-7, nafg wrote:
Sometimes? At random?

Viktor Hedefalk

unread,
May 21, 2013, 2:45:46 AM5/21/13
to lif...@googlegroups.com
Can someone explain how the implicit resolution changed? Its definitely 2.10.

Just upgraded a project from 2.9_2.5-RC5 to 2.10_2.5-RC5 yesterday and
had to add a few .cmd here and there.

Thanks,
Viktor

Jeppe Nejsum Madsen

unread,
May 21, 2013, 3:30:20 AM5/21/13
to lif...@googlegroups.com
Naftoli Gugenheim <nafto...@gmail.com> writes:

> Sometimes? At random?

Ahh had the same problem and forgot to add a fix (not been doing so much
Lift work lately).

I think the rules have become more strict so if there are multiple
implicit conversions in scope, none will be selected.

And there's a jsExpToJsCmd in both JqJsCmds and JsCmds so if you import
both, you'll get this error.

/Jeppe
> --

Naftoli Gugenheim

unread,
May 21, 2013, 4:17:23 AM5/21/13
to liftweb
Yes, it was a bug in older scala versions.

Viktor Hedefalk

unread,
May 21, 2013, 4:51:08 PM5/21/13
to lif...@googlegroups.com
Cool, thanks for the info!
Reply all
Reply to author
Forward
0 new messages