Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed the Scala library/compiler version check

It know checks at the major/minor level, not lower. And logs an error if
it cannot find a match.

Fix #1000793
(cherry picked from commit 8112072)
  • Loading branch information...
commit 06d2a99fb6810e28dafa06b6b04007ec90f47569 1 parent cd52824
Luc Bourlier skyluc authored
7 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala
View
@@ -131,10 +131,11 @@ class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IEl
//lazy val sbtScalaCompiler = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-compiler.jar")
val scalaLibBundle = {
- val bundles = Option(Platform.getBundles(ScalaPlugin.plugin.libraryPluginId, scalaCompilerBundleVersion.toString())).getOrElse(Array[Bundle]())
+ // all library bundles
+ val bundles = Option(Platform.getBundles(ScalaPlugin.plugin.libraryPluginId, null)).getOrElse(Array[Bundle]())
logger.debug("[scalaLibBundle] Found %d bundles: %s".format(bundles.size, bundles.toList.mkString(", ")))
- bundles.find(_.getVersion() == scalaCompilerBundleVersion).getOrElse {
- logger.warning("Couldnt find a match for %s in %s. Using default.".format(scalaCompilerBundleVersion, bundles.toList.mkString(", ")))
+ bundles.find(b => b.getVersion().getMajor() == scalaCompilerBundleVersion.getMajor() && b.getVersion().getMinor() == scalaCompilerBundleVersion.getMinor()).getOrElse {
+ logger.error("Could not find a match for %s in %s. Using default.".format(scalaCompilerBundleVersion, bundles.toList.mkString(", ")), null)
Platform.getBundle(ScalaPlugin.plugin.libraryPluginId)
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.