Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8b02d6f

Browse files
Merge pull request #152 from gourlaysama/new-collections
Upgrade to 2.13.0-M4 and new collections
2 parents e420513 + bd43152 commit 8b02d6f

File tree

6 files changed

+25
-4
lines changed

6 files changed

+25
-4
lines changed

‎build.sbt‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ScalaModulePlugin._
33
scalaVersionsByJvm in ThisBuild := {
44
val v211 = "2.11.12"
55
val v212 = "2.12.6"
6-
val v213 = "2.13.0-M3"
6+
val v213 = "2.13.0-M4"
77

88
Map(
99
6 -> List(v211 -> true),
@@ -38,7 +38,15 @@ lazy val `scala-parser-combinators` = crossProject.in(file(".")).
3838
"Scala Parser Combinators",
3939
"-doc-version",
4040
version.value
41-
)
41+
),
42+
unmanagedSourceDirectories in Compile ++= {
43+
(unmanagedSourceDirectories in Compile).value.map { dir =>
44+
CrossVersion.partialVersion(scalaVersion.value) match {
45+
case Some((2, 13)) => file(dir.getPath ++ "-2.13")
46+
case _ => file(dir.getPath ++ "-2.11-2.12")
47+
}
48+
}
49+
}
4250
).
4351
jvmSettings(
4452
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"),

‎project/plugins.sbt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.14")
22

3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.23")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package scala.util.parsing.input
2+
3+
private[input] trait ScalaVersionSpecificPagedSeq[T] {
4+
// Nothing for 2.11 and 2.12!
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package scala.util.parsing.input
2+
3+
private[input] trait ScalaVersionSpecificPagedSeq[T] { self: PagedSeq[T] =>
4+
// Members declared in scala.collection.Seq
5+
override def iterableFactory: collection.SeqFactory[collection.IndexedSeq] = collection.IndexedSeq
6+
7+
}

‎shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class PagedSeq[T: ClassTag] protected(
129129
end: Int)
130130
extends scala.collection.AbstractSeq[T]
131131
with scala.collection.IndexedSeq[T]
132+
with ScalaVersionSpecificPagedSeq[T]
132133
{
133134
def this(more: (Array[T], Int, Int) => Int) = this(more, new Page[T](0), 0, UndeterminedEnd)
134135

‎shared/src/test/scala/scala/util/parsing/combinator/UnitTestIO.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class UnitTestIO {
2525
val s = "Here is a test string"
2626
val f = io.Source.fromBytes(s.getBytes("utf-8"))
2727
val b = new collection.mutable.ArrayBuffer[Char]()
28-
f.copyToBuffer(b)
28+
b ++= f
2929
assertEquals(new String(b.toArray), s)
3030
}
3131
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /