Prashant Chaudhary
Prashant Chaudhary

Reputation: 11

Scala parallel collections import

ERROR: shows error on the word parallel object parallel is not a member of package collection import scala.collection.parallel.CollectionConverters._

:-- Already added this in build.sbt

libraryDependencies ++= {
  CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((2, major)) if major <= 12 =>
      Seq()
    case _ =>
      Seq("org.scala-lang.modules" %% "scala-parallel-collections" % "2.13.10")
  }
}

Upvotes: 1

Views: 332

Answers (1)

Pavel
Pavel

Reputation: 823

According to the documentation you should add "org.scala-lang.modules" %% "scala-parallel-collections" % "<version>" which you did, but the <version> here corresponds to the library version, not the scala version, so replace it with "1.0.4".

You should also see an error in your sbt build like Error downloading org.scala-lang.modules:scala-parallel-collections_2.13:2.13.10

Upvotes: 4

Related Questions