lihaoyi/workbench-example-app

Implicit conversions not applicable for the TodoMVC

mathieuleclaire opened this issue · 9 comments

Hi,
the todoMVC example does not compile due to an implicit conversion conflict:

found   : org.scalajs.dom.HTMLInputElement
[error]  required: scalatags.JsDom.Node
[error]     (which expands to)  scalatags.generic.Node[org.scalajs.dom.Element]
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error]  both method bindElement in trait LowPriorityImplicits of type (e: org.scalajs.dom.Element)scalatags.generic.Node[org.scalajs.dom.Element]
[error]  and method NumericNode in object JsDom of type [T](u: T)(implicit evidence$1: Numeric[T])scalatags.JsDom.StringNode
[error]  are possible conversion functions from org.scalajs.dom.HTMLInputElement to scalatags.JsDom.Node
[error]             inputBox,

Could you try updating the build.sbt dependency on Scalatags from 0.3.0 to 0.3.8? Alternatively, try updating the scalaVersion to 2.11.1.

There is a bug in 2.10.x w.r.t. type-inference that got fixed in 2.11.x, and also got fixed in 0.3.something (I forgot which one). Let me know if it doesn't work for you. Also, if it does work for you, please send a PR =)

Looks like it was fixed in 0.3.2 and above com-lihaoyi/scalatags#23

I just cloned and ran it and it worked, because of the scalaVersion := 2.11.1 in built.sbt.

A dependency is still not found for me (you may get it in your .ivy2/local folder).

sbt.ResolveException: unresolved dependency: com.typesafe.play#play-json_2.10;2.2.2: not found

Should be fixed by #10

Actually not, I still have the same error. Did you try to clone the project on the todomvc branch and to compile it from scratch ?

Yeah I did

It's really weird, cause I trashed my .ivy2 and rebuild from scratch with a freshly cloned project and the dependency is still not resolved.

Adding a plugins.sbt in a project directory with :

resolvers += "Typesafe repository" at
  "http://repo.typesafe.com/typesafe/releases/"

fixes the problem. I didnt succeed in doing a pull request for a particular branch (I don't know if it is doable !)