Skip to content

Commit 6db6dbe

Browse files
authored
Merge pull request #102 from SethTisue/scala-2.13.2
bump Scala version to 2.13.2 & enable -Werror
2 parents d9c295f + f4a6ceb commit 6db6dbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+86
-196
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import: scala/scala-dev:travis/default.yml
55
language: scala
66

77
scala:
8-
- 2.13.0
8+
- 2.13.2
99

1010
env:
1111
- ADOPTOPENJDK=8

build.sbt

+23-28
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,40 @@
1-
resolvers in ThisBuild += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
1+
Global / cancelable := true
2+
publish / skip := true // in root
23

3-
scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature"/*, "-Xfatal-warnings"*/)
4-
5-
cancelable in Global := true
6-
7-
skip in publish := true // in root
8-
9-
lazy val commonSettings: Seq[Setting[_]] = Seq()
10-
11-
commonSettings // in root
4+
lazy val commonSettings: Seq[Setting[_]] =
5+
ScalaModulePlugin.scalaModuleSettings ++ Seq(
6+
Compile / compile / scalacOptions += "-Werror"
7+
)
128

139
lazy val core = project.in(file("core"))
14-
.settings(ScalaModulePlugin.scalaModuleSettings)
1510
.settings(commonSettings)
1611
.settings(
17-
name := "scala-parallel-collections"
18-
)
12+
name := "scala-parallel-collections"
13+
)
1914

2015
lazy val junit = project.in(file("junit"))
2116
.settings(commonSettings)
2217
.settings(
23-
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
24-
// for javax.xml.bind.DatatypeConverter, used in SerializationStabilityTest
25-
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.1" % Test,
26-
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
27-
fork in Test := true,
28-
skip in publish := true
29-
).dependsOn(testmacros, core)
18+
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
19+
// for javax.xml.bind.DatatypeConverter, used in SerializationStabilityTest
20+
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.1" % Test,
21+
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
22+
Test / fork := true,
23+
publish / skip := true
24+
).dependsOn(testmacros, core)
3025

3126
lazy val scalacheck = project.in(file("scalacheck"))
3227
.settings(commonSettings)
3328
.settings(
34-
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.3",
35-
fork in Test := true,
36-
testOptions in Test += Tests.Argument(TestFrameworks.ScalaCheck, "-workers", "1", "-minSize", "0", "-maxSize", "4000", "-minSuccessfulTests", "5"),
37-
skip in publish := true
38-
).dependsOn(core)
29+
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.3",
30+
Test / fork := true,
31+
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-workers", "1", "-minSize", "0", "-maxSize", "4000", "-minSuccessfulTests", "5"),
32+
publish / skip := true
33+
).dependsOn(core)
3934

4035
lazy val testmacros = project.in(file("testmacros"))
4136
.settings(commonSettings)
4237
.settings(
43-
libraryDependencies += scalaOrganization.value % "scala-compiler" % scalaVersion.value,
44-
skip in publish := true
45-
)
38+
libraryDependencies += scalaOrganization.value % "scala-compiler" % scalaVersion.value,
39+
publish / skip := true
40+
)

core/src/main/scala/scala/collection/Parallel.scala

-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,5 @@ package scala
1414
package collection
1515

1616
/** A marker trait for collections which have their operations parallelised.
17-
*
18-
* @since 2.9
19-
* @author Aleksandar Prokopec
2017
*/
2118
trait Parallel

core/src/main/scala/scala/collection/generic/CanCombineFrom.scala

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import scala.collection.parallel._
2222
* builder to be created.
2323
* @tparam Elem the element type of the collection to be created.
2424
* @tparam To the type of the collection to be created.
25-
* @since 2.8
2625
*/
2726
trait CanCombineFrom[-From, -Elem, +To] extends Parallel {
2827
def apply(from: From): Combiner[Elem, To]

core/src/main/scala/scala/collection/generic/GenericParCompanion.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package generic
1717
import scala.collection.parallel.Combiner
1818
import scala.collection.parallel.ParIterable
1919
import scala.collection.parallel.ParMap
20-
import scala.language.{higherKinds, implicitConversions}
20+
import scala.language.implicitConversions
2121

2222
/** A template class for companion objects of parallel collection classes.
2323
* They should be mixed in together with `GenericCompanion` type.
@@ -108,4 +108,4 @@ object GenericParMapCompanion {
108108
def newBuilder: mutable.Builder[(K, V), CC[K, V]] = parFactory.newCombiner
109109
}
110110

111-
}
111+
}

core/src/main/scala/scala/collection/generic/GenericParTemplate.scala

-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ import scala.collection.parallel.ParIterable
1919
import scala.collection.parallel.ParMap
2020

2121
import scala.annotation.unchecked.uncheckedVariance
22-
import scala.language.higherKinds
2322

2423
/** A template trait for collections having a companion.
2524
*
2625
* @tparam A the element type of the collection
2726
* @tparam CC the type constructor representing the collection class
28-
* @author Aleksandar Prokopec
29-
* @since 2.8
3027
*/
3128
trait GenericParTemplate[+A, +CC[X] <: ParIterable[X]]
3229
extends GenericTraversableTemplate[A, CC]

core/src/main/scala/scala/collection/generic/GenericTraversableTemplate.scala

-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
package scala.collection.generic
1414

15-
import scala.language.higherKinds
1615
import scala.annotation.migration
1716
import scala.annotation.unchecked.uncheckedVariance
1817
import scala.collection.mutable.Builder
@@ -23,8 +22,6 @@ import scala.collection.parallel.ParIterable
2322
*
2423
* @tparam A The type of the collection elements.
2524
* @tparam CC The type constructor representing the collection class.
26-
* @author Martin Odersky
27-
* @since 2.8
2825
* @define coll collection
2926
*/
3027
// TODO inline in GenericParTemplate or ParIterable

core/src/main/scala/scala/collection/generic/HasNewCombiner.scala

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ package generic
1616

1717
import scala.collection.parallel.Combiner
1818

19-
/**
20-
* @since 2.8
21-
*/
2219
trait HasNewCombiner[+T, +Repr] {
2320
protected[this] def newCombiner: Combiner[T, Repr]
2421
}

core/src/main/scala/scala/collection/generic/ParFactory.scala

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package collection
1515
package generic
1616

1717
import scala.collection.parallel.ParIterable
18-
import scala.language.higherKinds
1918

2019
/** A template class for companion objects of `ParIterable` and subclasses
2120
* thereof. This class extends `TraversableFactory` and provides a set of
@@ -25,7 +24,6 @@ import scala.language.higherKinds
2524
* This object provides a set of operations needed to create `$Coll` values.
2625
* @define coll parallel collection
2726
* @define Coll `ParIterable`
28-
* @since 2.8
2927
*/
3028
abstract class ParFactory[CC[X] <: ParIterable[X] with GenericParTemplate[X, CC]]
3129
extends GenericParCompanion[CC] {

core/src/main/scala/scala/collection/generic/ParMapFactory.scala

+1-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package generic
1717
import scala.collection.parallel.ParMap
1818
import scala.collection.parallel.ParMapLike
1919
import scala.collection.parallel.Combiner
20-
import scala.language.higherKinds
2120

2221
/** A template class for companion objects of `ParMap` and subclasses thereof.
2322
* This class extends `TraversableFactory` and provides a set of operations
@@ -27,8 +26,6 @@ import scala.language.higherKinds
2726
* @define Coll `ParMap`
2827
* @define factoryInfo
2928
* This object provides a set of operations needed to create `$Coll` values.
30-
* @author Aleksandar Prokopec
31-
* @since 2.8
3229
*/
3330
abstract class ParMapFactory[CC[X, Y] <: ParMap[X, Y] with ParMapLike[X, Y, CC, CC[X, Y], _]]
3431
extends GenericParMapCompanion[CC] {
@@ -67,4 +64,4 @@ extends GenericParMapCompanion[CC] {
6764
def apply() = newCombiner[K, V]
6865
}
6966

70-
}
67+
}

core/src/main/scala/scala/collection/generic/ParSetFactory.scala

-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ package generic
1717
import scala.collection.parallel.Combiner
1818
import scala.collection.parallel.ParSet
1919
import scala.collection.parallel.ParSetLike
20-
import scala.language.higherKinds
2120

2221
/**
2322
* @define factoryInfo
2423
* This object provides a set of operations needed to create `$Coll` values.
25-
* @author Aleksandar Prokopec
26-
* @since 2.8
2724
*/
2825
abstract class ParSetFactory[CC[X] <: ParSet[X] with ParSetLike[X, CC, CC[X], _] with GenericParTemplate[X, CC]]
2926
extends GenericParCompanion[CC] {

core/src/main/scala/scala/collection/generic/Signalling.scala

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ import java.util.concurrent.atomic.AtomicInteger
2525
* signalling interface to inform worker threads that an element has
2626
* been found and no further search is necessary.
2727
*
28-
* @author prokopec
29-
*
3028
* @define abortflag
3129
* Abort flag being true means that a worker can abort and produce whatever result,
3230
* since its result will not affect the final result of computation. An example

core/src/main/scala/scala/collection/immutable/OldHashMap.scala

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ import scala.collection.mutable.{Builder, ImmutableBuilder}
2828
*
2929
* @tparam K the type of the keys contained in this hash map.
3030
* @tparam V the type of the values associated with the keys.
31-
* @author Martin Odersky
32-
* @author Tiark Rompf
33-
* @since 2.3
3431
* @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#hash-tries "Scala's Collection Library overview"]]
3532
* section on `Hash Tries` for more information.
3633
* @define Coll `immutable.OldHashMap`

core/src/main/scala/scala/collection/immutable/OldHashSet.scala

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ import scala.annotation.tailrec
2929
*
3030
* @tparam A the type of the elements contained in this hash set.
3131
*
32-
* @author Martin Odersky
33-
* @author Tiark Rompf
34-
* @since 2.3
3532
* @define Coll `immutable.OldHashSet`
3633
* @define coll immutable hash set
3734
*/

core/src/main/scala/scala/collection/mutable/FlatHashTable.scala

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import scala.util.hashing.byteswap32
2626
* hash table as an implementation.
2727
*
2828
* @define coll flat hash table
29-
* @since 2.3
3029
* @tparam A the type of the elements contained in the $coll.
3130
*/
3231
private[collection] trait FlatHashTable[A] extends FlatHashTable.HashUtils[A] {

core/src/main/scala/scala/collection/parallel/Combiner.scala

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ import scala.collection.generic.Sizing
2929
*
3030
* @tparam Elem the type of the elements added to the builder
3131
* @tparam To the type of the collection the builder produces
32-
*
33-
* @author Aleksandar Prokopec
34-
* @since 2.9
3532
*/
3633
trait Combiner[-Elem, +To] extends Builder[Elem, To] with Sizing with Parallel {
3734

core/src/main/scala/scala/collection/parallel/ParIterable.scala

-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ import scala.collection.parallel.mutable.ParArrayCombiner
2323
* $sideeffects
2424
*
2525
* @tparam T the element type of the collection
26-
*
27-
* @author Aleksandar Prokopec
28-
* @since 2.9
2926
*/
3027
trait ParIterable[+T]
3128
extends GenericParTemplate[T, ParIterable]

core/src/main/scala/scala/collection/parallel/ParIterableLike.scala

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
package scala
1414
package collection.parallel
1515

16-
import scala.language.{ higherKinds, implicitConversions }
16+
import scala.language.implicitConversions
1717
import scala.collection.mutable.Builder
1818
import scala.collection.mutable.ArrayBuffer
1919
import scala.collection.{CustomParallelizable, IterableOps, Parallel}
@@ -122,9 +122,6 @@ import scala.reflect.ClassTag
122122
* Method `size` is implemented as a constant time operation for parallel collections, and parallel collection
123123
* operations rely on this assumption.
124124
*
125-
* @author Aleksandar Prokopec
126-
* @since 2.9
127-
*
128125
* @define sideeffects
129126
* The higher-order functions passed to certain operations may contain side-effects. Since implementations
130127
* of bulk operations may not be sequential, this means that side-effects may not be predictable and may
@@ -874,7 +871,7 @@ self =>
874871
protected[this] def newSubtask(p: IterableSplitter[T]): Accessor[R, Tp]
875872
def shouldSplitFurther = pit.shouldSplitFurther(self.repr, tasksupport.parallelismLevel)
876873
def split = pit.splitWithSignalling.map(newSubtask(_)) // default split procedure
877-
private[parallel] override def signalAbort = pit.abort()
874+
private[parallel] override def signalAbort() = pit.abort()
878875
override def toString = this.getClass.getSimpleName + "(" + pit.toString + ")(" + result + ")(supername: " + super.toString + ")"
879876
}
880877

core/src/main/scala/scala/collection/parallel/ParMap.scala

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ import scala.collection.generic.CanCombineFrom
2525
*
2626
* @tparam K the key type of the map
2727
* @tparam V the value type of the map
28-
*
29-
* @author Aleksandar Prokopec
30-
* @since 2.9
3128
*/
3229
trait ParMap[K, +V]
3330
extends GenericParMapTemplate[K, V, ParMap]

core/src/main/scala/scala/collection/parallel/ParMapLike.scala

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import scala.collection.{IterableOnce, MapOps}
1818
import scala.collection.Map
1919

2020
import scala.annotation.unchecked.uncheckedVariance
21-
import scala.language.higherKinds
2221

2322
/** A template trait for mutable parallel maps. This trait is to be mixed in
2423
* with concrete parallel maps to override the representation type.
@@ -29,9 +28,6 @@ import scala.language.higherKinds
2928
* @tparam V the value type of the map
3029
* @define Coll `ParMap`
3130
* @define coll parallel map
32-
*
33-
* @author Aleksandar Prokopec
34-
* @since 2.9
3531
*/
3632
trait ParMapLike[K,
3733
+V,

core/src/main/scala/scala/collection/parallel/ParSeq.scala

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import scala.collection.parallel.mutable.ParArrayCombiner
2626
* $sideeffects
2727
*
2828
* @tparam T the type of the elements in this parallel sequence
29-
*
30-
* @author Aleksandar Prokopec
3129
*/
3230
trait ParSeq[+T] extends ParIterable[T]
3331
with GenericParTemplate[T, ParSeq]

0 commit comments

Comments
 (0)