Skip to content

Referring to non-existent class #629

@mseddon

Description

@mseddon

I have a scalajs project that attempts to mix both scalaJs and scalaJvm (based on spray-can), using scalajs 4.3. For fun, I tried to add "org.scalaz" %% "scalaz-core" % "7.0.6" to the scalajs libraryDependencies. While the compilation step passes fine, preoptimizeJs fires a bunch of warnings along the lines of:

[warn] Referring to non-existent class scalaz_Apply$
[warn] Referring to non-existent class scalaz_Scalaz$
[warn] Referring to non-existent class scalaz_Apply
[warn] Referring to non-existent method scalaz_Scalaz$.some__O__Lscala_Option
[warn] called from com_example_Test.main__V

This is most likely not a scala-js issue, rather, my bad project configuration, but I am wondering where to begin tracking down the issue. How can it be that scala-js compiles the classes correctly and then loses them when sending to closure compiler? There are certainly no obvious errors being reported.

Incidentally, I ran into a similar problem the other day upgrading a project to use scala-js 0.5-M2 and scala-js-dom 0.5-M2. In this case, no classes from scala-js-dom could be found, but simply restoring the versions for scalajs-sbt-plugin and scala-js-dom back to 0.4.3 solved the issue. At the time I assumed I was perhaps too far on the bleeding edge, but now I'm almost entirely certain I'm not understanding something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis is a question on using Scala.js. Closed because it should go to Stack Overflow or gitter.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions