After migrating to ScalaJS 0.6.23
from 0.6.21
:
(addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.23")
)
My sbt
-build throws the following exception:
...
[error] /Users/mpa/dev/Github/pme123/scala-adapters/project/Settings.scala:88:20: value %%% is not a member of String
[error] "org.scala-js" %%% "scalajs-dom" % "0.9.6"
[error] ^
[error] /Users/mpa/dev/Github/pme123/scala-adapters/project/Settings.scala:90:27: value %%% is not a member of String
[error] , "com.typesafe.play" %%% "play-json" % "2.6.1"
...
This is the value from the Settings.scala
:
lazy val clientDependencies: Seq[Def.Setting[_]] = Def.settings(libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.6"
, "org.scala-lang.modules" %% "scala-xml" % "1.0.6"
, ...
))
And this is how it is used in build.sbt
:
lazy val client = (project in file("client"))
.settings(sharedSettings(Some("client")))
.settings(clientSettings)
.settings(clientDependencies)
.settings(jsSettings)
.enablePlugins(ScalaJSWeb)
.dependsOn(sharedJs)
This is the project: https://github.com/pme123/scala-adapters
The release notes of Scala.js 0.6.23 say that
Usages of
%%%
in.scala
files of an sbt build (underproject/
) need a new import:import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
For
.sbt
files, this import is automatically added, so nothing changes.
So you need to add
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
in your Settings.scala
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With