Created
February 11, 2014 18:04
-
-
Save gkossakowski/8940448 to your computer and use it in GitHub Desktop.
How to build sbt on top of Scala 2.11.0-M8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Run `publish-local` for sbinary from 5af79a0f833d2f0ccf8cc791c2f15f984fb80cc8 (latest master) with sbinary.patch applied. | |
2. Got to sbt checkout of 0.13 branch (4ab8074753695665300b692a4fee26635b1ed118) and apply sbt.patch | |
3. In sbt console `++ 2.11.0-M8`; compile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/project/SBinaryProject.scala b/project/SBinaryProject.scala | |
index 59bd1a6..3063c51 100644 | |
--- a/project/SBinaryProject.scala | |
+++ b/project/SBinaryProject.scala | |
@@ -9,8 +9,8 @@ object SBinaryProject extends Build | |
lazy val commonSettings: Seq[Setting[_]] = Seq( | |
organization := "org.scala-tools.sbinary", | |
- version := "0.4.3-SNAPSHOT", | |
- scalaVersion := "2.10.2", | |
+ version := "0.4.2", | |
+ scalaVersion := "2.11.0-M8", | |
includeTestDependencies <<= scalaVersion(sv => sv.startsWith("2.10.") || sv.startsWith("2.11")) | |
) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/actions/src/main/scala/sbt/compiler/Eval.scala b/main/actions/src/main/scala/sbt/compiler/Eval.scala | |
index 505897f..6785392 100644 | |
--- a/main/actions/src/main/scala/sbt/compiler/Eval.scala | |
+++ b/main/actions/src/main/scala/sbt/compiler/Eval.scala | |
@@ -58,7 +58,7 @@ final class Eval(optionsNoncp: Seq[String], classpath: Seq[File], mkReporter: Se | |
} | |
lazy val reporter = mkReporter(settings) | |
lazy val global: Global = new Global(settings, reporter) | |
- import global._ | |
+ import global.{Range => _, _} | |
import definitions._ | |
private[sbt] def unlinkDeferred() { | |
diff --git a/project/Sbt.scala b/project/Sbt.scala | |
index 800ef4a..b4c820d 100644 | |
--- a/project/Sbt.scala | |
+++ b/project/Sbt.scala | |
@@ -276,7 +276,7 @@ object Sbt extends Build | |
artifact in (Compile, packageSrc) := Artifact(srcID).copy(configurations = Compile :: Nil).extra("e:component" -> srcID) | |
) | |
def compilerSettings = Seq( | |
- libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-compiler" % _ % "test" excludeAll(ExclusionRule(organization = "org.scala-lang.modules"))), | |
+ libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "test"), | |
unmanagedJars in Test <<= (packageSrc in compileInterfaceSub in Compile).map(x => Seq(x).classpath) | |
) | |
def precompiled(scalav: String): Project = baseProject(compilePath / "interface", "Precompiled " + scalav.replace('.', '_')) dependsOn(interfaceSub) settings(precompiledSettings : _*) settings( | |
@@ -290,6 +290,6 @@ object Sbt extends Build | |
sources in Test := Nil | |
) | |
def ioSettings: Seq[Setting[_]] = Seq( | |
- libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "test" excludeAll(ExclusionRule(organization = "org.scala-lang.modules"))) | |
+ libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "test") | |
) | |
} | |
diff --git a/project/Util.scala b/project/Util.scala | |
index 61c58ab..125d46b 100644 | |
--- a/project/Util.scala | |
+++ b/project/Util.scala | |
@@ -172,8 +172,7 @@ object Common | |
lazy val httpclient = lib("commons-httpclient" % "commons-httpclient" % "3.1") | |
lazy val jsch = lib("com.jcraft" % "jsch" % "0.1.46" intransitive() ) | |
lazy val sbinary = libraryDependencies <+= Util.nightly211(n => "org.scala-tools.sbinary" % "sbinary" % "0.4.2" cross(if(n) CrossVersion.full else CrossVersion.binary)) | |
- lazy val scalaCompiler = libraryDependencies <+= scalaVersion( | |
- sv => "org.scala-lang" % "scala-compiler" % sv excludeAll(ExclusionRule(organization = "org.scala-lang.modules"))) | |
+ lazy val scalaCompiler = libraryDependencies <+= scalaVersion(sv => "org.scala-lang" % "scala-compiler" % sv) | |
lazy val testInterface = lib("org.scala-sbt" % "test-interface" % "1.0") | |
private def scala211Module(name: String, moduleVersion: String) = | |
libraryDependencies <++= (scalaVersion)( scalaVersion => |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment