Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #201 from dotta/issue/new-nightly-builds-for-scala…

…-1001256

Added new build profile for Scala 2.11
  • Loading branch information...
commit 5c1d30eec30786d610efcc47feaedac6302ebc7c 2 parents ca44dc9 + a88a43a
@dotta dotta authored
View
43 org.scala-ide.scala.compiler/pom.xml
@@ -67,6 +67,49 @@
</plugins>
</build>
</profile>
+
+ <profile>
+ <!-- Scala 2.11.x -->
+ <!-- Scala reflect was extracted in a different jar in 2.11 -->
+ <id>scala-2.11.x</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-reflect</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <!-- add the source jar, to be able to attach the source to the Scala container. And the continuation plug-in -->
+ <id>copy.reflect</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-reflect</artifactId>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ <destFileName>scala-reflect-src.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ <stripVersion>true</stripVersion>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<build>
View
10 org.scala-ide.scala.library/pom.xml
@@ -13,21 +13,17 @@
<packaging>bundle</packaging>
<properties>
- <!-- some default values, can be overwritten by profiles -->
+ <!-- default value for Scala 2.10+, can be overwritten by profiles -->
<!-- dirty trick to avoid code duplication -->
- <scala.library.third-part>scala-dbc</scala.library.third-part>
+ <scala.library.third-part>scala-actors</scala.library.third-part>
</properties>
<profiles>
<profile>
<!--- the profile using the default values. Scala 2.9.x -->
<id>scala-2.9.x</id>
- </profile>
- <profile>
- <!-- Scala 2.10.x -->
- <id>scala-2.10.x</id>
<properties>
- <scala.library.third-part>scala-actors</scala.library.third-part>
+ <scala.library.third-part>scala-dbc</scala.library.third-part>
</properties>
</profile>
</profiles>
View
14 org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/classpath/ClasspathTests.scala
@@ -21,6 +21,17 @@ import scala.tools.eclipse.testsetup.SDTTestUtils
object ClasspathTests extends TestProjectSetup("classpath")
+/** This test class relies on JARs located in "test-workspace/classpath/lib/${Scala.shortVersion}.x".
+ * If you need to support a new Scala major version, you'll have to:
+ *
+ * - Add a new folder under "test-workspace/classpath/lib/". Name the folder "${Scala.shortVersion}.x".
+ * - In the freshly created folder:
+ * + Copy "binary-scala-library" from on of the existing "test-workspace/classpath/lib/${Scala.shortVersion}.x/binary-scala-library"
+ * + Inside the copied "binary-scala-library", update the "version.number" in the library.properties.
+ * + Create a JAR of "binary-scala-library" and call it "scala-library.jar"
+ * + Create a copy of the freshly created "scala-library.jar" and name it "my-scala-library.jar"
+ * - Update the logic in `ClasspathTests.createIncompatibleScalaLibraryEntry`
+ */
class ClasspathTests {
import ClasspathTests._
@@ -301,7 +312,8 @@ class ClasspathTests {
(ScalaPlugin.plugin.shortScalaVer match {
case "2.8" => "2.9"
case "2.9" => "2.10"
- case "2.10" => "2.8"
+ case "2.10" => "2.11"
+ case "2.11" => "2.9"
case _ =>
fail("Unsupported embedded scala library version " + ScalaPlugin.plugin.scalaVer +". Please update the test.")
""
View
2  ...dt.core.tests/test-workspace/classpath/lib/2.10.x/binary-scala-library/library.properties
@@ -1,4 +1,4 @@
-# To test library with a 2.9.x version number
+# To test library with a 2.10.x version number
version.number=2.10.x
copyright.string=Copyright 2002-2011, LAMP/EPFL
View
3  ....core.tests/test-workspace/classpath/lib/2.11.x/binary-scala-library/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.6.0_26 (Apple Inc.)
+
View
4 ...dt.core.tests/test-workspace/classpath/lib/2.11.x/binary-scala-library/library.properties
@@ -0,0 +1,4 @@
+# To test library with a 2.11.x version number
+
+version.number=2.11.x
+copyright.string=Copyright 2002-2011, LAMP/EPFL
View
BIN  ...dt.core.tests/test-workspace/classpath/lib/2.11.x/binary-scala-library/scala/Predef.class
Binary file not shown
View
BIN  org.scala-ide.sdt.core.tests/test-workspace/classpath/lib/2.11.x/my-scala-library.jar
Binary file not shown
View
BIN  org.scala-ide.sdt.core.tests/test-workspace/classpath/lib/2.11.x/scala-library.jar
Binary file not shown
View
17 org.scala-ide.sdt.core/src-2.11/scala/tools/eclipse/SymbolsCompatibility.scala
@@ -0,0 +1,17 @@
+package scala.tools.eclipse
+
+import scala.reflect.internal.Symbols
+
+/**
+ * Trait used to keep 2.9/2.10/2.11 source compatibility
+ */
+trait SymbolsCompatibility { self: Symbols =>
+
+ /**
+ * This class as been removed in 2.10, but we need its real implementation in 2.9
+ */
+ case class InvalidCompanions(sym1: Symbol, sym2: Symbol) extends Throwable {
+
+ }
+
+}
View
20 pom.xml
@@ -76,7 +76,6 @@
</profile>
<profile>
- <!-- Scala 2.10.x -->
<id>scala-2.10.x</id>
<properties>
<scala.version>2.10.0-SNAPSHOT</scala.version>
@@ -85,13 +84,28 @@
<sbt.compiled.version>2.10</sbt.compiled.version>
<version.suffix>2_10</version.suffix>
- <repo.scala-refactoring>${repo.scala-ide.root}/scala-refactoring-trunk</repo.scala-refactoring>
- <repo.scalariform>${repo.scala-ide.root}/scalariform-trunk</repo.scalariform>
+ <repo.scala-refactoring>${repo.scala-ide.root}/scala-refactoring-210x</repo.scala-refactoring>
+ <repo.scalariform>${repo.scala-ide.root}/scalariform-210x</repo.scalariform>
<repo.typesafe>http://repo.typesafe.com/typesafe/ide-2.10</repo.typesafe>
</properties>
</profile>
<profile>
+ <id>scala-2.11.x</id>
+ <properties>
+ <scala.version>2.11.0-SNAPSHOT</scala.version>
+ <scala.major.minor.version>2.11</scala.major.minor.version>
+ <scala.library.version>${scala.version}</scala.library.version>
+ <sbt.compiled.version>2.11</sbt.compiled.version>
+ <version.suffix>2_11</version.suffix>
+
+ <repo.scala-refactoring>${repo.scala-ide.root}/scala-refactoring-211x</repo.scala-refactoring>
+ <repo.scalariform>${repo.scala-ide.root}/scalariform-211x</repo.scalariform>
+ <repo.typesafe>http://repo.typesafe.com/typesafe/ide-2.11</repo.typesafe>
+ </properties>
+ </profile>
+
+ <profile>
<!-- Eclipse Juno -->
<id>eclipse-juno</id>
<properties>
Please sign in to comment.
Something went wrong with that request. Please try again.