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
Revert "VectorBuilder avoids copying data if possible" #8410
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SethTisue
added
the
prio:blocker
release blocker (used only by core team, only near release time)
label
Sep 10, 2019
Should we add to @Test
def i11636(): Unit = {
val a: Vector[String] = "O" +: Iterator.continually("E").take(2101).foldLeft(Vector.empty[String])((v, e) => v :+ e) :+ "C"
val a0: ArraySeq[String] = ArraySeq("O") ++ Iterator.continually("E").take(2101) ++ ArraySeq("C")
val b: Vector[String] = "O" +: Iterator.continually("E").take(223) .foldLeft(Vector.empty[String])((v, e) => v :+ e) :+ "C"
val b0: ArraySeq[String] = ArraySeq("O") ++ Iterator.continually("E").take(223) ++ ArraySeq("C")
val c: Vector[String] = "O" +: Iterator.continually("E").take(135) .foldLeft(Vector.empty[String])((v, e) => v :+ e) :+ "C"
val c0: ArraySeq[String] = ArraySeq("O") ++ Iterator.continually("E").take(135) ++ ArraySeq("C")
val d: Vector[String] = "O" +: Iterator.continually("E").take(0) .foldLeft(Vector.empty[String])((v, e) => v :+ e) :+ "C"
val d0: ArraySeq[String] = ArraySeq("O", "C")
val e: Vector[String] = "O" +: Iterator.continually("E").take(376) .foldLeft(Vector.empty[String])((v, e) => v :+ e) :+ "C"
val e0: ArraySeq[String] = ArraySeq("O") ++ Iterator.continually("E").take(376) ++ ArraySeq("C")
val f: Vector[String] = "O" +: Iterator.continually("E").take(365) .foldLeft(Vector.empty[String])((v, e) => v :+ e) :+ "C"
val f0: ArraySeq[String] = ArraySeq("O") ++ Iterator.continually("E").take(365) ++ ArraySeq("C")
assertEquals(a0, a)
assertEquals(b0, b)
assertEquals(c0, c)
assertEquals(d0, d)
assertEquals(e0, e)
assertEquals(f0, f)
assertEquals(a0 ++ b0, a ++ b)
assertEquals(a0 ++ b0 ++ c0, a ++ b ++ c)
assertEquals(a0 ++ b0 ++ c0 ++ d0, a ++ b ++ c ++ d)
assertEquals(a0 ++ b0 ++ c0 ++ d0 ++ e0, a ++ b ++ c ++ d ++ e)
assertEquals(a0 ++ b0 ++ c0 ++ d0 ++ e0 ++ f0, a ++ b ++ c ++ d ++ e ++ f)
} |
joshlemer
reviewed
Sep 10, 2019
@@ -110,7 +110,7 @@ object Vector extends StrictOptimizedSeqFactory[Vector] { | |||
* @define mayNotTerminateInf | |||
* @define willNotTerminateInf | |||
*/ | |||
final class Vector[+A] private[immutable] (private[collection] val startIndex: Int, private[collection] val endIndex: Int, private[immutable] val focus: Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line doesn't need to change.
szeiger
force-pushed
the
wip/revert-7588
branch
2 times, most recently
from
September 11, 2019 13:39
83bd8ae
to
d4d59b1
Compare
sigh the MiMa whitelist is really, really annoying. Almost every PR requires new entries which will cause conflicts with every other PR. |
szeiger
force-pushed
the
wip/revert-7588
branch
from
September 11, 2019 15:00
d4d59b1
to
a5f2ce4
Compare
This reverts commit 18224fd. # Conflicts: # src/library/scala/collection/immutable/Vector.scala Reverts most of scala#7588 which caused scala/bug#11636.
szeiger
force-pushed
the
wip/revert-7588
branch
from
September 11, 2019 15:44
a5f2ce4
to
a26c917
Compare
Thank you @szeiger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts commit 18224fd.
Reverts #7588 which caused
scala/bug#11636.
See #8246 for context.