Can someone help me figure out how to make this not-so-old code work again?
I’m opening a project in IntelliJ which I haven’t opened in a while.
The build.sbt
claims it is using scalaVersion 2.13.1. I’m not sure whether IntelliJ honors that scala version or not.
I have reason to doubt, because there is a 2.12 directory but not 2.13 directory in the project/target
directory.
The build.sbt file also claims version 12.0.2-R18 of scalafx.
name := "mgs"
version := "0.1"
scalaVersion := "2.13.1"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.1" % "test"
libraryDependencies += "org.scalactic" %% "scalactic" % "3.1.0"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0" % "test"
libraryDependencies += "org.scalafx" %% "scalafx" % "12.0.2-R18"
libraryDependencies += "org.scala-lang.modules" %% "scala-parallel-collections" % "0.2.0"
val circeVersion = "0.12.3"
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion)
When I try to run the code again, javafx seems to be missing. I seem to recall this worked the last time I looked at it, but it fails now. I get the following errors.
Error:(58, 26) Symbol 'term javafx.scene.image' is missing from the classpath.
This symbol is required by 'class scalafx.scene.image.WritableImage'.
Make sure that term image is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'WritableImage.class' was compiled against an incompatible version of javafx.scene.
private val wimg = new WritableImage(width, height)
Error:(223, 14) not found: value javafx
import javafx.embed.swing.SwingFXUtils._
Error:(228, 13) not found: value fromFXImage
write(fromFXImage(wimg, null), "png", file)