Skip to content

Commit f8a5b00

Browse files
committed
drop support for Scala 2.11 as of 0.10.0
also upgrade Scala 2.12.4 -> 2.12.6
1 parent e3250b4 commit f8a5b00

File tree

6 files changed

+20
-46
lines changed

6 files changed

+20
-46
lines changed

Diff for: .travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ jdk:
1515
notifications:
1616
email:
1717
18+

Diff for: README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
# scala-async [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-async_2.11.svg?label=latest%20release%20for%202.11"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-async_2.11) [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-async_2.12.svg?label=latest%20release%20for%202.12"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-async_2.12)
1+
# scala-async [[<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-async_2.12.svg?label=latest%20release%20for%202.12"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-async_2.12)
22

33
## Supported Scala versions
44

5-
This branch targets Scala 2.11, 2.12, and 2.13.
5+
This branch targets Scala 2.12 and 2.13.
66

7-
Support for Scala 2.10 is [on a branch](https://github.com/scala/async/tree/2.10.x).
7+
Support for Scala 2.11 is [on a branch](https://github.com/scala/scala-async/tree/2.11.x).
8+
9+
Support for Scala 2.10 is [on a branch](https://github.com/scala/scala-async/tree/2.10.x).
810

911
## Quick start
1012

1113
To include scala-async in an existing project use the library published on Maven Central.
1214
For sbt projects add the following to your build definition - build.sbt or project/Build.scala:
1315

1416
```scala
15-
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.7"
17+
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.10.0"
1618
```
1719

1820
For Maven projects add the following to your <dependencies> (make sure to use the correct Scala version suffix
@@ -22,7 +24,7 @@ to match your project’s Scala binary version):
2224
<dependency>
2325
<groupId>org.scala-lang.modules</groupId>
2426
<artifactId>scala-async_2.12</artifactId>
25-
<version>0.9.7</version>
27+
<version>0.10.0</version>
2628
</dependency>
2729
```
2830

Diff for: admin/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ env:
4040
script: admin/build.sh
4141
4242
jdk:
43-
- openjdk6
4443
- oraclejdk8
4544
4645
notifications:

Diff for: build.sbt

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ import ScalaModulePlugin._
33
scalaModuleSettings
44

55
scalaVersionsByJvm in ThisBuild := {
6-
val v211 = "2.11.12"
7-
val v212 = "2.12.4"
6+
val v212 = "2.12.6"
87
val v213 = "2.13.0-M3"
9-
108
Map(
11-
7 -> List(v211 -> false),
12-
8 -> List(v212 -> true, v213 -> true, v211 -> true),
13-
9 -> List(v212 -> false, v213 -> false, v211 -> false))
9+
8 -> List(v212 -> true, v213 -> true),
10+
9 -> List(v212 -> false, v213 -> false))
1411
}
1512

1613
name := "scala-async"

Diff for: src/main/scala/scala/async/internal/TransformUtils.scala

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2012-2014 Lightbend Inc. <http://www.lightbend.com>
2+
* Copyright (C) 2012-2018 Lightbend Inc. <http://www.lightbend.com>
33
*/
44
package scala.async.internal
55

@@ -406,15 +406,12 @@ private[async] trait TransformUtils {
406406
}
407407

408408
// =====================================
409-
// Copy/Pasted from Scala 2.10.3. See SI-7694.
410-
private lazy val UncheckedBoundsClass = {
411-
try c.mirror.staticClass("scala.reflect.internal.annotations.uncheckedBounds")
412-
catch { case _: ScalaReflectionException => NoSymbol }
413-
}
414-
final def uncheckedBounds(tp: Type): Type = {
415-
if ((tp.typeArgs.isEmpty && (tp match { case _: TypeRef => true; case _ => false}))|| UncheckedBoundsClass == NoSymbol) tp
409+
// Copy/Pasted from Scala 2.10.3. See scala/bug#7694
410+
private lazy val UncheckedBoundsClass =
411+
c.mirror.staticClass("scala.reflect.internal.annotations.uncheckedBounds")
412+
final def uncheckedBounds(tp: Type): Type =
413+
if ((tp.typeArgs.isEmpty && (tp match { case _: TypeRef => true; case _ => false}))) tp
416414
else withAnnotation(tp, Annotation(UncheckedBoundsClass.asType.toType, Nil, ListMap()))
417-
}
418415
// =====================================
419416

420417
/**
@@ -608,4 +605,4 @@ private[async] trait TransformUtils {
608605
}
609606

610607
case object ContainsAwait
611-
case object NoAwait
608+
case object NoAwait

Diff for: src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala

+2-24
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import scala.async.TreeInterrogation
77

88
class UncheckedBoundsSpec {
99
@Test def insufficientLub_SI_7694() {
10-
suppressingFailureBefore2_10_3 {
11-
eval( s"""
10+
eval( s"""
1211
object Test {
1312
import _root_.scala.async.run.toughtype._
1413
import _root_.scala.async.internal.AsyncId.{async, await}
@@ -17,12 +16,10 @@ class UncheckedBoundsSpec {
1716
}
1817
}
1918
""", compileOptions = s"-cp ${toolboxClasspath} ")
20-
}
2119
}
2220

2321
@Test def insufficientLub_SI_7694_ScalaConcurrent() {
24-
suppressingFailureBefore2_10_3 {
25-
eval( s"""
22+
eval( s"""
2623
object Test {
2724
import _root_.scala.async.run.toughtype._
2825
import _root_.scala.async.Async.{async, await}
@@ -33,25 +30,6 @@ class UncheckedBoundsSpec {
3330
}
3431
}
3532
""", compileOptions = s"-cp ${toolboxClasspath} ")
36-
}
3733
}
3834

39-
private def suppressingFailureBefore2_10_3(body: => Any) {
40-
try {
41-
body
42-
} catch {
43-
case x: Throwable =>
44-
// @uncheckedBounds was only introduced in 2.10.3/ 2.11.0-M5, so avoid reporting this test failure in those cases.
45-
scala.util.Properties.versionNumberString match {
46-
case "2.10.0" | "2.10.1" | "2.10.2" | "2.11.0-M4" => // ignore, the @uncheckedBounds doesn't exist yet
47-
case _ =>
48-
val annotationExists =
49-
reflect.runtime.currentMirror.staticClass("scala.reflect.internal.annotations.uncheckedBounds") == reflect.runtime.universe.NoSymbol
50-
if (annotationExists)
51-
Assert.fail("@uncheckedBounds not found in scala-reflect.jar")
52-
else
53-
Assert.fail(s"@uncheckedBounds exists, but it didn't prevent this failure: $x")
54-
}
55-
}
56-
}
5735
}

0 commit comments

Comments
 (0)