Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 d913f1fb8761520b57396f59c8ff4ccf783cdcd5 1 parent a0a6622
Luc Bourlier skyluc authored
7 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala
@@ -131,10 +131,11 @@ class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IEl
131 131 //lazy val sbtScalaCompiler = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-compiler.jar")
132 132
133 133 val scalaLibBundle = {
134   - val bundles = Option(Platform.getBundles(ScalaPlugin.plugin.libraryPluginId, scalaCompilerBundleVersion.toString())).getOrElse(Array[Bundle]())
  134 + // all library bundles
  135 + val bundles = Option(Platform.getBundles(ScalaPlugin.plugin.libraryPluginId, null)).getOrElse(Array[Bundle]())
135 136 logger.debug("[scalaLibBundle] Found %d bundles: %s".format(bundles.size, bundles.toList.mkString(", ")))
136   - bundles.find(_.getVersion() == scalaCompilerBundleVersion).getOrElse {
137   - logger.warning("Couldnt find a match for %s in %s. Using default.".format(scalaCompilerBundleVersion, bundles.toList.mkString(", ")))
  137 + bundles.find(b => b.getVersion().getMajor() == scalaCompilerBundleVersion.getMajor() && b.getVersion().getMinor() == scalaCompilerBundleVersion.getMinor()).getOrElse {
  138 + logger.error("Could not find a match for %s in %s. Using default.".format(scalaCompilerBundleVersion, bundles.toList.mkString(", ")), null)
138 139 Platform.getBundle(ScalaPlugin.plugin.libraryPluginId)
139 140 }
140 141 }

0 comments on commit d913f1f

Please sign in to comment.
Something went wrong with that request. Please try again.