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

Move PagedSeq from scala-library to parser-combinators #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
gourlaysama merged 1 commit into scala:master from gourlaysama:topic/move-paged-seq
Jan 25, 2017

Conversation

Copy link
Contributor

@gourlaysama gourlaysama commented Jan 24, 2017

This moves scala.collection.immutable.PagedSeq to the
scala.util.parsing.input package, after it was deprecated over there
(see SI-9503).

The only real bit of change doesn't show on the diff because it is a new
file, so here is the diff between the scala-library version and this
one:

diff --git i/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala w/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala
index 01854b1..ba12ec2 100644
--- i/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala
+++ w/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala
@@ -9,10 +9,9 @@
 package scala
-package collection
-package immutable
+package util.parsing.input
-import java.io.{File, FileReader, Reader}
+import java.io.{File, FileReader, Reader => JReader}
 import scala.reflect.ClassTag
 /** The `PagedSeq` object defines a lazy implementations of
@@ -20,9 +19,7 @@ import scala.reflect.ClassTag
 *
 * Provides utility methods that return instances of `PagedSeq[Char]`.
 * `fromIterator` and `fromIterable` provide generalised instances of `PagedSeq`
- * @since 2.7
 */
-@deprecated("this object will be moved to the scala-parser-combinators module", "2.11.8")
 object PagedSeq {
 final val UndeterminedEnd = Int.MaxValue
@@ -85,7 +82,7 @@ object PagedSeq {
 /** Constructs a paged character sequence from an input reader
 */
- def fromReader(source: Reader): PagedSeq[Char] =
+ def fromReader(source: JReader): PagedSeq[Char] =
 new PagedSeq(source.read(_: Array[Char], _: Int, _: Int))
 /** Constructs a paged character sequence from an input file
@@ -120,13 +117,11 @@ import PagedSeq._
 * @tparam T the type of the elements contained in this paged sequence, with an `ClassTag` context bound.
 *
 * @author Martin Odersky
- * @since 2.7
 * @define Coll `PagedSeq`
 * @define coll paged sequence
 * @define mayNotTerminateInf
 * @define willNotTerminateInf
 */
-@deprecated("this class will be moved to the scala-parser-combinators module", "2.11.8")
 class PagedSeq[T: ClassTag] protected(
 more: (Array[T], Int, Int) => Int,
 first1: Page[T],

Fixes #71

This moves `scala.collection.immutable.PagedSeq` to the
`scala.util.parsing.input` package, after it was deprecated over there
(see SI-9503).
The only real bit of change doesn't show on the diff because it is a new
file, so here is the diff between the scala-library version and this
one:
diff --git i/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala w/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala
index 01854b1..ba12ec2 100644
--- i/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala
+++ w/shared/src/main/scala/scala/util/parsing/input/PagedSeq.scala
@@ -9,10 +9,9 @@
 package scala
-package collection
-package immutable
+package util.parsing.input
-import java.io.{File, FileReader, Reader}
+import java.io.{File, FileReader, Reader => JReader}
 import scala.reflect.ClassTag
 /** The `PagedSeq` object defines a lazy implementations of
@@ -20,9 +19,7 @@ import scala.reflect.ClassTag
 *
 * Provides utility methods that return instances of `PagedSeq[Char]`.
 * `fromIterator` and `fromIterable` provide generalised instances of `PagedSeq`
- * @SInCE 2.7
 */
-@deprecated("this object will be moved to the scala-parser-combinators module", "2.11.8")
 object PagedSeq {
 final val UndeterminedEnd = Int.MaxValue
@@ -85,7 +82,7 @@ object PagedSeq {
 /** Constructs a paged character sequence from an input reader
 */
- def fromReader(source: Reader): PagedSeq[Char] =
+ def fromReader(source: JReader): PagedSeq[Char] =
 new PagedSeq(source.read(_: Array[Char], _: Int, _: Int))
 /** Constructs a paged character sequence from an input file
@@ -120,13 +117,11 @@ import PagedSeq._
 * @tparam T the type of the elements contained in this paged sequence, with an `ClassTag` context bound.
 *
 * @author Martin Odersky
- * @SInCE 2.7
 * @define Coll `PagedSeq`
 * @define coll paged sequence
 * @define mayNotTerminateInf
 * @define willNotTerminateInf
 */
-@deprecated("this class will be moved to the scala-parser-combinators module", "2.11.8")
 class PagedSeq[T: ClassTag] protected(
 more: (Array[T], Int, Int) => Int,
 first1: Page[T],
Fixes scala#71 
@gourlaysama gourlaysama merged commit 2324d69 into scala:master Jan 25, 2017
@gourlaysama gourlaysama deleted the topic/move-paged-seq branch January 25, 2017 11:50
Copy link
Member

🎉

Copy link
Member

@gourlaysama would a PR backporting this change to 1.0.x be accepted...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@SethTisue SethTisue SethTisue approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
1.1.0
Development

Successfully merging this pull request may close these issues.

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