Move to scalatags 0.3.8
mathieuleclaire opened this issue · 4 comments
mathieuleclaire commented
Hi,
some implicit conversion no longer work in the TodoMVC example with the 0.3.8 version of scalatags.
Mathieu
mathieuleclaire commented
More precisely, with scalatags 0.3.8, the following errors occur:
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:23: not found: type Node
[error] implicit def RxStr[T](r: Rx[T])(implicit f: T => Node): Node = {
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:23: not found: type Node
[error] implicit def RxStr[T](r: Rx[T])(implicit f: T => Node): Node = {
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:33: not found: type Node
[error] implicit def rxMod[T <: dom.HTMLElement](r: Rx[HtmlTag]): Node = {
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:24: type mismatch;
[error] found : T
[error] required: scalatags.JsDom.Modifier
[error] (which expands to) scalatags.generic.Modifier[org.scalajs.dom.Element]
[error] Note: implicit method RxStyleValue is not applicable here because it comes after the application point and it lacks an explicit result type
[error] rxMod(Rx(span(r())))
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:46: reference to AttrValue is ambiguous;
[error] it is imported twice in the same scope by
[error] import all._
[error] and import scalatags.JsDom._
[error] implicit def RxAttrValue[T: AttrValue] = new AttrValue[Rx[T]]{
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:48: reference to AttrValue is ambiguous;
[error] it is imported twice in the same scope by
[error] import all._
[error] and import scalatags.JsDom._
[error] Obs(r){ implicitly[AttrValue[T]].apply(t, a, r())}
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:46: reference to AttrValue is ambiguous;
[error] it is imported twice in the same scope by
[error] import all._
[error] and import scalatags.JsDom._
[error] implicit def RxAttrValue[T: AttrValue] = new AttrValue[Rx[T]]{
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:51: reference to StyleValue is ambiguous;
[error] it is imported twice in the same scope by
[error] import all._
[error] and import scalatags.JsDom._
[error] implicit def RxStyleValue[T: StyleValue] = new StyleValue[Rx[T]]{
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:53: reference to StyleValue is ambiguous;
[error] it is imported twice in the same scope by
[error] import all._
[error] and import scalatags.JsDom._
[error] Obs(r){ implicitly[StyleValue[T]].apply(t, s, r())}
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/Framework.scala:51: reference to StyleValue is ambiguous;
[error] it is imported twice in the same scope by
[error] import all._
[error] and import scalatags.JsDom._
[error] implicit def RxStyleValue[T: StyleValue] = new StyleValue[Rx[T]]{
[error] ^
[error] /home/mathieu/work/labo/scala/workbench-example-app/src/main/scala/example/ScalaJSExample.scala:78: could not find implicit value for parameter ev: scalatags.generic.AttrValue[Builder,rx.core.Rx[String]]
[error] `class` := Rx{
[error] ^
[error] 11 errors found
hussachai commented
@mathieuleclaire Replace Node with Modifier and everything will be fine.
mathieuleclaire commented
Thanks. It fixes the errors concerning the Nodes.
Note that we also need to invoke explicitely scala scalatags.JsDom.AttrValue
and scala scalatags.JsDom.StyleValue
to avoid the ambigous reference to them.
lihaoyi commented
I moved everything to 0.4.0