Skip to content
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

SI-8680 Stream.addString is too eager #3848

Merged
merged 1 commit into from
Sep 16, 2014
Merged

Conversation

Ichoran
Copy link
Contributor

@Ichoran Ichoran commented Jun 29, 2014

Used the standard method of sending out two iterators, one twice as fast as the others, to avoid hanging on .force, .hasDefiniteSize, and .addString.

.addString appends a "..." as the last element if it detects a cycle. It knows how to print the cycle length, but there's no good way to specify what you want right now, so it's not used.

Added tests in t8680 that verify that cyclic streams give the expected results.

scala/bug#8680

@adriaanm
Copy link
Contributor

adriaanm commented Jul 3, 2014

Ping @Ichoran:

test.bc:
     [echo] Checking backward binary compatibility for scala-library (against 2.11.0)
     [mima] Found 3 binary incompatibiities
     [mima] ===============================
     [mima]  * synthetic method
     [mima]    scala$collection$immutable$Stream$$loop$6(Int,Int,scala.Function1)scala.collection.immutable.Stream
     [mima]    in object scala.collection.immutable.Stream does not have a correspondent in
     [mima]    new version
     [mima]  * synthetic method
     [mima]    scala$collection$immutable$Stream$$loop$5(Int,scala.collection.immutable.Stream,java.lang.Object)scala.collection.immutable.Stream
     [mima]    in class scala.collection.immutable.Stream does not have a correspondent in
     [mima]    new version
     [mima]  * synthetic method
     [mima]    scala$collection$immutable$Stream$$loop$4(scala.collection.immutable.Set,scala.collection.immutable.Stream)scala.collection.immutable.Stream
     [mima]    in class scala.collection.immutable.Stream does not have a correspondent in
     [mima]    new version
     [mima] Generated filter config definition
     [mima] ==================================
     [mima] 
     [mima]     filter {
     [mima]         problems=[
     [mima]             {
     [mima]                 matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$6"
     [mima]                 problemName=MissingMethodProblem
     [mima]             },
     [mima]             {
     [mima]                 matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$5"
     [mima]                 problemName=MissingMethodProblem
     [mima]             },
     [mima]             {
     [mima]                 matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$4"
     [mima]                 problemName=MissingMethodProblem
     [mima]             }
     [mima]         ]
     [mima]     }
     [mima] 

@Ichoran
Copy link
Contributor Author

Ichoran commented Jul 3, 2014

@adriaanm - Yeah, I meant to talk to you about this. These are inner recursive methods that nobody should ever call or know about. What is the policy with these? I couldn't keep the same interface anyway, due to different requirements for the loops. I can put dead loops back in just to keep the formal method list the same. Or is it okay to drop these since nobody should use them except the body of methods that I've changed (in otherwise binary compatible ways)?

@adriaanm
Copy link
Contributor

adriaanm commented Jul 4, 2014

Yeah, since these methods are effectively private, we can just add them to the mima whitelist.

@lrytz lrytz modified the milestones: 2.11.3, 2.11.2 Jul 15, 2014
@retronym

This comment has been minimized.

@Ichoran

This comment has been minimized.

@retronym

This comment has been minimized.

@Ichoran

This comment has been minimized.

@gkossakowski

This comment has been minimized.

@Ichoran

This comment has been minimized.

@scala-jenkins

This comment has been minimized.

@gkossakowski

This comment has been minimized.

@Ichoran Ichoran force-pushed the issue/8680 branch 2 times, most recently from fac4178 to 8bcfca1 Compare September 12, 2014 14:28
Used the standard method of sending out two iterators, one twice as fast as the others, to avoid hanging on .force, .hasDefiniteSize, and .addString.

.addString appends a "..." as the last element if it detects a cycle.  It knows how to print the cycle length, but there's no good way to specify what you want right now, so it's not used.

Added tests in t8680 that verify that cyclic streams give the expected results.

Added to whitelist names of methods formerly used for recursion (now looping).
@lrytz
Copy link
Member

lrytz commented Sep 16, 2014

LGTM

lrytz added a commit that referenced this pull request Sep 16, 2014
SI-8680  Stream.addString is too eager
@lrytz lrytz merged commit 223e207 into scala:2.11.x Sep 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants