Permalink
Browse files

Use stock sbt 0.13 from eclipse

* Move sbt to 2.9.2 for 2.9.x series.
* Use short sbt.compiled.version for 2.10.x
* Use full version of sbinary.
* Fixed continuation plugin test: Continuations plugin is _not_ enabled by default in 2.10
  • Loading branch information...
1 parent 1009ec8 commit 2c9c6f79ece8c6655600f89d7450797068d2cb7e @vigdorchik vigdorchik committed with dotta Jul 25, 2012
Showing with 387 additions and 935 deletions.
  1. +3 −6 org.scala-ide.sbt.full.library/.classpath
  2. +30 −73 org.scala-ide.sbt.full.library/pom.xml
  3. +2 −2 org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/classpath/ClasspathTests.scala
  4. +2 −5 org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/compiler/settings/CompilerSettingsTest.scala
  5. +0 −15 org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/sbtbuilder/SbtBuilderTest.scala
  6. +1 −1 org.scala-ide.sdt.core/META-INF/MANIFEST.MF
  7. +3 −3 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala
  8. +62 −44 org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaProject.scala
  9. +0 −181 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/AnalysisCompile.scala
  10. +84 −155 ...ala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/EclipseSbtBuildManager.scala
  11. +21 −13 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/JavaEclipseCompiler.scala
  12. +0 −25 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/SbtBuildLogger.scala
  13. +33 −128 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/SbtBuildReporter.scala
  14. +0 −117 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/SbtConf.scala
  15. +104 −0 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/SbtInputs.scala
  16. +0 −48 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/ScalaSbtCompiler.scala
  17. +0 −30 org.scala-ide.sdt.core/src/scala/tools/eclipse/buildmanager/sbtintegration/WeaklyCachedStore.scala
  18. +9 −1 org.scala-ide.sdt.core/src/scala/tools/eclipse/util/OSGiUtils.scala
  19. +1 −1 org.scala-ide.sdt.debug/META-INF/MANIFEST.MF
  20. +32 −87 pom.xml
@@ -3,21 +3,18 @@
<classpathentry exported="true" kind="lib" path="lib/api_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/classfile_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/classpath_2.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/collections_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/compile_2.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/compiler-integration_2.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/compiler-interface_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/control_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/incremental-compiler_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/interface_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/io_2.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/ivy_2.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/ivy.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jline.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/launcher_2.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/launcher-interface_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/logging_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/persist_2.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/precompiled-2.9.1-2_9_1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/process_2.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/relation_2.9.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/sbinary_2.9.1.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
@@ -23,101 +23,84 @@
<dependencies>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>api_${sbt.compiled.version}</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>classfile_${sbt.compiled.version}</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.scala-tools.sbt</groupId>
+ <groupId>org.scala-sbt</groupId>
<artifactId>classpath_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>collections_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>logging_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>compile_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>io_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.scala-tools.sbt</groupId>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
<artifactId>control_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>incremental-compiler_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>classfile_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>io_${sbt.compiled.version}</artifactId>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>process_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>ivy_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>relation_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>launcher-interface_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>interface_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>logging_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>persist_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>persist_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>api_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>process_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compiler-integration_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
- <!-- all the other dependencies -->
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>launcher_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>incremental-compiler_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
- <!-- use the interface with which we were built -->
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>precompiled-${sbt.compiled.version}-${scala.precompiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compile_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>interface_${sbt.compiled.version}</artifactId>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compiler-interface_${sbt.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
- <!-- all the dependencies necessary for running like sbinary, ivy, jline -->
+ <!-- all the dependencies necessary for running like sbinary, jline -->
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.apache.ivy</groupId>
- <artifactId>ivy</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
<groupId>org.scala-tools.sbinary</groupId>
- <artifactId>sbinary_${sbt.compiled.version}</artifactId>
+ <artifactId>sbinary_${sbinary.compiled.version}</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
@@ -147,31 +130,6 @@
</configuration>
</plugin>
<plugin>
- <!-- copy the compiler interfaces with the right name -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>compile</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.scala-tools.sbt</groupId>
- <artifactId>precompiled-${sbt.compiled.version}-${scala.precompiled.version}</artifactId>
- <type>jar</type>
- <destFileName>scala-${scala.major.minor.version}/lib/compiler-interface.jar</destFileName>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<!-- generate the MANIFEST.MF file, and create the bundle -->
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -186,7 +144,6 @@
<_exportcontents>sbt.*;version=${sbt.version},xsbt.*;version=${sbt.version},xsbti.*;version=${sbt.version},sbinary.*;version=${sbinary.version},jline.*;version=0.9.94,org.apache.ivy.*;version=2.2.0</_exportcontents>
<Embed-Directory>lib</Embed-Directory>
<Embed-StripVersion>true</Embed-StripVersion>
- <Include-Resource>lib=${project.build.directory}/lib</Include-Resource>
<Import-Package>!org.apache.ivy.*,!org.bouncycastle.*,!org.scalatools.testing.*,!com.craft.*,!com.jcraft.*,!sun.misc,!org.apache.commons.vfs,!org.apache.commons.vfs.impl,!org.apache.oro.text,!org.apache.oro.text
.regex,*</Import-Package>
</instructions>
@@ -234,10 +234,10 @@ class ClasspathTests {
project.classpathHasChanged() // trick to make the check happen
- val errors = projectErrors(ScalaPlugin.plugin.problemMarkerId, ScalaPlugin.plugin.settingProblemMarkerId)
+ val errors = projectErrors(ScalaPlugin.plugin.settingProblemMarkerId)
// on 2.8 an invalid setting is reported twice, so the total number of errors is 3 or 4
- assertTrue("unexpected number of scala problems in project: " + errors, errors.length >= 3)
+ assertTrue("unexpected number of scala problems in project: " + errors, errors.length >= 1)
// back to normal
project.storage.setValue(CompilerSettings.ADDITIONAL_PARAMS, "")
@@ -19,10 +19,7 @@ class CompilerSettingsTest {
val errors = allBuildErrorsOf(unit)
- if(ScalaPlugin.plugin.shortScalaVer == "2.9")
- assertTrue(errors.nonEmpty)
- else
- assertTrue(errors.isEmpty) // continuations plugin is enabled by default in 2.10+
+ assertTrue(errors.nonEmpty)
}
@Test
@@ -49,4 +46,4 @@ class CompilerSettingsTest {
project.storage.setValue("P", value)
}
}
-}
+}
@@ -132,18 +132,6 @@ class SbtBuilderTest {
assertNoErrors(fooClientCU)
}
- @Test def scalaLibrary_shouldBe_on_BootClasspath() {
- import SDTTestUtils._
-
- val Seq(prjClient) = createProjects("client")
-
- Assert.assertTrue("Found Scala library", prjClient.scalaClasspath.scalaLib.isDefined)
- val basicConf = new BasicConfiguration(prjClient, ScalaCompilerConf.deployedInstance)
- val args = basicConf.buildArguments(Seq())
- Assert.assertTrue("BasicConfiguration bootclasspath " + args, args.mkString(" ").contains("-bootclasspath %s".format(prjClient.scalaClasspath.scalaLib.get.toFile.getAbsolutePath)))
- deleteProjects(prjClient)
- }
-
@Test def scalaLibrary_in_dependent_project_shouldBe_on_BootClasspath() {
import SDTTestUtils._
import ScalaPlugin.plugin
@@ -167,9 +155,6 @@ class SbtBuilderTest {
val expectedLib = plugin.workspaceRoot.findMember("/library/bin").getLocation
Assert.assertEquals("Unexpected Scala lib", expectedLib, prjClient.scalaClasspath.scalaLib.get)
- val basicConf = new BasicConfiguration(prjClient, ScalaCompilerConf.deployedInstance)
- val args = basicConf.buildArguments(Seq())
- Assert.assertTrue("BasicConfiguration bootclasspath " + args, args.mkString(" ").contains("-bootclasspath " + expectedLib))
deleteProjects(prjClient, prjLib)
}
@@ -42,7 +42,7 @@ Require-Bundle:
org.scala-ide.scala.library,
org.scala-ide.scala.compiler,
org.scala-refactoring.library,
- org.scala-ide.sbt.full.library;bundle-version="[0.11.2,0.11.3)",
+ org.scala-ide.sbt.full.library;bundle-version="[0.13,0.14)",
scalariform,
org.junit4;bundle-version="4.5.0",
org.eclipse.ui.browser;bundle-version="3.3.0"
@@ -24,7 +24,7 @@ import org.eclipse.ui.plugin.AbstractUIPlugin
import util.SWTUtils.asyncExec
import org.osgi.framework.BundleContext
import scala.tools.eclipse.javaelements.{ ScalaElement, ScalaSourceFile }
-import scala.tools.eclipse.util.OSGiUtils.pathInBundle
+import scala.tools.eclipse.util.OSGiUtils._
import scala.tools.eclipse.templates.ScalaTemplateManager
import org.eclipse.jdt.ui.PreferenceConstants
import org.eclipse.core.resources.IResourceDelta
@@ -151,7 +151,7 @@ class ScalaPlugin extends AbstractUIPlugin with PluginLogConfigurator with IReso
Trim(continuationsClasses map { _.removeLastSegments(1).toOSString })
lazy val sbtCompilerBundle = Platform.getBundle(sbtPluginId)
- lazy val sbtCompilerInterface = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/compiler-interface.jar")
+ lazy val sbtCompilerInterface = allPathsInBundle(sbtCompilerBundle, "/lib", "compiler-interface*.jar").toIterable.headOption
// Disable for now, until we introduce a way to have multiple scala libraries, compilers available for the builder
//lazy val sbtScalaLib = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-library.jar")
//lazy val sbtScalaCompiler = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-compiler.jar")
@@ -401,4 +401,4 @@ class ScalaPlugin extends AbstractUIPlugin with PluginLogConfigurator with IReso
*/
def isBuildable(fileName: String): Boolean =
(fileName.endsWith(scalaFileExtn) || fileName.endsWith(javaFileExtn))
-}
+}
Oops, something went wrong.

0 comments on commit 2c9c6f7

Please sign in to comment.