From 1a9f7f9281f428184b32cd9d79db8a69d5c5bb4a Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 23 Apr 2017 18:42:26 +0200 Subject: [PATCH 1/2] Upgrade to Scala 2.11.11 Now that #2260 has been merged, nothing is holding us back from upgrading. --- project/Build.scala | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index cc6b5a6c3735..db403959c3d1 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -14,7 +14,7 @@ object Build { projectChecks() - val scalacVersion = "2.11.5" // Do not rename, this is grepped in bin/common. + val scalacVersion = "2.11.11" // Do not rename, this is grepped in bin/common. val dottyOrganization = "ch.epfl.lamp" val dottyVersion = { @@ -82,10 +82,6 @@ object Build { javacOptions in Global ++= Seq("-Xlint:unchecked", "-Xlint:deprecation") ) - /** Enforce 2.11.5. Do not let it be upgraded by dependencies. */ - private val overrideScalaVersionSetting = - ivyScala := ivyScala.value.map(_.copy(overrideScalaVersion = true)) - // set sources to src/, tests to test/ and resources to resources/ lazy val sourceStructure = Seq( scalaSource in Compile := baseDirectory.value / "src", @@ -448,8 +444,6 @@ object Build { settings(sourceStructure). settings(dottyCompilerSettings). settings( - overrideScalaVersionSetting, - // Disable scaladoc generation, it's way too slow and we'll replace it // by dottydoc anyway. We still publish an empty -javadoc.jar to make // sonatype happy. @@ -520,8 +514,6 @@ object Build { dependsOn(`dotty-compiler`). settings(sourceStructure). settings( - overrideScalaVersionSetting, - cleanSbtBridge := { val dottySbtBridgeVersion = version.value val dottyVersion = (version in `dotty-compiler`).value @@ -609,8 +601,6 @@ object DottyInjectedPlugin extends AutoPlugin { enablePlugins(ScalaJSPlugin). settings(sourceStructure). settings( - overrideScalaVersionSetting, - /* Remove the Scala.js compiler plugin for scalac, and enable the * Scala.js back-end of dotty instead. */ @@ -644,8 +634,6 @@ object DottyInjectedPlugin extends AutoPlugin { dependsOn(`dotty-compiler` % "compile->test"). settings(sourceStructure). settings( - overrideScalaVersionSetting, - baseDirectory in (Test,run) := (baseDirectory in `dotty-compiler`).value, libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.6" % Test, From 97ed7ab1d60b1ce53be1579ae18190c86fd90524 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 23 Apr 2017 18:43:45 +0200 Subject: [PATCH 2/2] SymDenotations: do not use deprecated BitSet#toImmutable As explained in the deprecated message: "method toImmutable in class BitSet is deprecated: If this BitSet contains a value that is 128 or greater, the result of this method is an 'immutable' BitSet that shares state with this mutable BitSet. Thus, if the mutable BitSet is modified, it will violate the immutability of the result" --- compiler/src/dotty/tools/dotc/core/SymDenotations.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala index 1e0beb5f30bd..e5cc94883dd1 100644 --- a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala @@ -7,7 +7,7 @@ import Types._, Flags._, Decorators._, DenotTransformers._, StdNames._, Scopes._ import NameOps._, NameKinds._ import Scopes.Scope import collection.mutable -import collection.immutable.BitSet +import collection.BitSet import scala.reflect.io.AbstractFile import Decorators.SymbolIteratorDecorator import ast._ @@ -1412,7 +1412,7 @@ object SymDenotations { to } val bcs = classSymbol :: addParentBaseClasses(classParents, Nil) - val scbits = seen.toImmutable + val scbits = seen if (isFullyCompleted) { myBaseClasses = bcs mySuperClassBits = scbits