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
Add the default methods of j.u.Iterator default methods #1937
Merged
sjrd
merged 2 commits into
scala-native:master
from
LeeTibbert:PR_j_u_Iterator_DefaultMethods_2020-10-09
Oct 13, 2020
Merged
Add the default methods of j.u.Iterator default methods #1937
sjrd
merged 2 commits into
scala-native:master
from
LeeTibbert:PR_j_u_Iterator_DefaultMethods_2020-10-09
Oct 13, 2020
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
* This PR provides the missing remove() default method. This method is used by the Scala.js TestMainBase hierarchy. Having this method, along with previous PR scala-native#1934 allows JUnit CollectionsTest.scala and others to link and execute, with the expected zero tests run. * For completeness, this PR also provides the forEachRemaining() default method. It is not used by the TestMainBase hierarchy and could be deferred to a separate PR. The overall project cost of including it here seemed to be less than the cost of a separate PR. * The effective change is in Iterator.scala. Because it now provides a default message, a number of other files need overrides. There should be no functional change. * There is no direct corresponding JUnit test for remove() because of circularity. This method is used by the environment which would test any standalone file. These changes will be extensively exercised by that test environment and defects will become obvious. * forEachRemaining() has a test in Scala.js IteratorTest.scala. That change in this PR Will become publicly tested when the current work to port the TestMainBase environment finishes. Until then, it is being heavily exercised in my porting environment. Documentation: * None required Testing: Safety - + Built and tested ("test-all") in debug mode using sbt 1.3.13 on X86_64 only . All tests pass. Efficacy - + Will be shown when the port of the Scala.js TestMainBase environment to Scala Native has been accomplished.
f7a60bb
to
7c1bdfc
Compare
sjrd
requested changes
Oct 9, 2020
sjrd
approved these changes
Oct 9, 2020
0bf900d
to
8089eab
Compare
Restart Travis CI. It failed for reasons not related to these changes. Out-of-Memory error whilst compiling a scripted test.
8089eab
to
8bc9e10
Compare
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 15, 2020
This PR builds upon merged PR scala-native#1937 by adding the JavaDefaultMethod annotation to the trait IOU: The discerning reader will notice that there is no ListTest.scala in this WIP. Before this PR can move out of WIP state the corresponding Scala.js ListTest.scala should be ported. Currently ScalaNative has no ListTest. Scala.js ListTest has a number of prerequisites, few of which are currently ported (such as TestMainBase). I believe porting those items in a series of separate PRs. Tedious, but it will leave a better audit trail. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 15, 2020
This PR builds upon merged PR scala-native#1937 by porting Function.scala and its corresponding test from Scala.js. This approach was taken instead of editing the existing file for three reasons: 1) This keeps the code and its test consistent. 2) The implementation in the Scala.js code looks like it allocates fewer memory objects. 3) This makes the Scala Native & Scala.js code identical. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 15, 2020
This PR builds upon merged PR scala-native#1937 by adding the JavaDefaultMethod annotation to the trait and porting the test for the trait. Note Well: Scala.js j.u.f.Consumer.scala carries a `@FunctionalInterface` annotation. I did not port that over. In another pass I will have to figure out if SN needs such an annotation and its implementation. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
This was referenced Nov 15, 2020
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 16, 2020
…e.scala in order to pick up the JavaDefaultMethod annotation. The corresponding test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. To keep the JavaDefaultMethod changes together, I am submitting it here by his kind permission. He did the port; I added a bit of audit trail information at the top. Thank you Lolgab. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 16, 2020
This PR builds upon merged PR scala-native#1937 by porting Collection.scala and its corresponding test from Scala.js. The test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 (nscplugin), scala-native#2009 (j.l.Iterable), & 2010 (TrivialCollection) are merged and this PR is re-based.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 17, 2020
This PR builds upon merged PR scala-native#1937 by porting Collection.scala and its corresponding test from Scala.js. The test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 (nscplugin), scala-native#2009 (j.l.Iterable), & 2010 (TrivialCollection) are merged and this PR is re-based.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 17, 2020
This PR builds upon merged PR scala-native#1937 by adding the JavaDefaultMethod annotation to the trait IOU: The discerning reader will notice that there is no ListTest.scala in this WIP. Before this PR can move out of WIP state the corresponding Scala.js ListTest.scala should be ported. Currently ScalaNative has no ListTest. Scala.js ListTest has a number of prerequisites, few of which are currently ported (such as TestMainBase). I believe porting those items in a series of separate PRs. Tedious, but it will leave a better audit trail. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 17, 2020
This PR builds upon merged PR scala-native#1937 by adding the JavaDefaultMethod annotation to the trait and porting the test for the trait. Note Well: Scala.js j.u.f.Consumer.scala carries a `@FunctionalInterface` annotation. I did not port that over. In another pass I will have to figure out if SN needs such an annotation and its implementation. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 18, 2020
…e.scala in order to pick up the JavaDefaultMethod annotation. The corresponding test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. To keep the JavaDefaultMethod changes together, I am submitting it here by his kind permission. He did the port; I added a bit of audit trail information at the top. Thank you Lolgab. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 18, 2020
This PR builds upon merged PR scala-native#1937 by porting Function.scala and its corresponding test from Scala.js. This approach was taken instead of editing the existing file for three reasons: 1) This keeps the code and its test consistent. 2) The implementation in the Scala.js code looks like it allocates fewer memory objects. 3) This makes the Scala Native & Scala.js code identical. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 18, 2020
This PR builds upon merged PR scala-native#1937 by porting j.u.f.Predicate.scala and its corresponding PredicateTest from Scala.js. The previously existing Predicate.scala is overwritten to keep the source and its test synchronized. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 18, 2020
This PR builds upon merged PR scala-native#1937 by annotating the existing j.u.f.BiPredicate.scala and porting its corresponding BiPredicateTest from Scala.js. The existing file was edited rather than porting the most current Scala.js commit because the latter uses lambdas and those do not play well when using Scala Native with Scala 2.11. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 18, 2020
This PR builds upon merged PR scala-native#1937 by porting Collection.scala and its corresponding test from Scala.js. The test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 (nscplugin), scala-native#2009 (j.l.Iterable), & 2010 (TrivialCollection) are merged and this PR is re-based.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 18, 2020
This PR builds upon merged PR scala-native#1937 by annotating the existing j.u.f.BiConsumer.scala and porting its corresponding BiConsumerTest from Scala.js. The existing file was edited rather than porting the most current Scala.js commit because the latter uses lambdas and those do not play well when using Scala Native with Scala 2.11. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
vicopem
pushed a commit
to vicopem/scala-native
that referenced
this pull request
Nov 19, 2020
vicopem
pushed a commit
to vicopem/scala-native
that referenced
this pull request
Nov 19, 2020
This PR builds upon merged PR scala-native#1937 by porting j.u.f.Predicate.scala and its corresponding PredicateTest from Scala.js. The previously existing Predicate.scala is overwritten to keep the source and its test synchronized. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
vicopem
added a commit
to vicopem/scala-native
that referenced
this pull request
Nov 19, 2020
…a-native#1937)" This reverts commit ba3aca2.
vicopem
added a commit
to vicopem/scala-native
that referenced
this pull request
Nov 19, 2020
…a-native#1937)" This reverts commit ba3aca2.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 28, 2020
This PR builds upon merged PR scala-native#1937 by porting Collection.scala and its corresponding test from Scala.js. The test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 (nscplugin), scala-native#2009 (j.l.Iterable), & 2010 (TrivialCollection) are merged and this PR is re-based.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 28, 2020
This PR builds upon merged PR scala-native#1937 by adding the JavaDefaultMethod annotation to the trait and porting the test for the trait. Note Well: Scala.js j.u.f.Consumer.scala carries a `@FunctionalInterface` annotation. I did not port that over. In another pass I will have to figure out if SN needs such an annotation and its implementation. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 28, 2020
This PR builds upon merged PR scala-native#1937 by annotating the existing j.u.f.BiPredicate.scala and porting its corresponding BiPredicateTest from Scala.js. The existing file was edited rather than porting the most current Scala.js commit because the latter uses lambdas and those do not play well when using Scala Native with Scala 2.11. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 28, 2020
This PR builds upon merged PR scala-native#1937 by annotating the existing j.u.f.BiConsumer.scala and porting its corresponding BiConsumerTest from Scala.js. The existing file was edited rather than porting the most current Scala.js commit because the latter uses lambdas and those do not play well when using Scala Native with Scala 2.11. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 28, 2020
This PR builds upon merged PRs scala-native#1937 & scala-native#2040 by annotating the existing j.u.f.BiFunction.scala and porting its corresponding BiFunctionTest from Scala.js. The existing file was edited rather than porting the most current Scala.js commit because the latter uses lambdas and those do not play well when using Scala Native with Scala 2.11.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 28, 2020
This PR builds upon merged PR scala-native#1937 by adding the JavaDefaultMethod annotation to the trait IOU: The discerning reader will notice that there is no ListTest.scala in this WIP. Before this PR can move out of WIP state the corresponding Scala.js ListTest.scala should be ported. Currently ScalaNative has no ListTest. Scala.js ListTest has a number of prerequisites, few of which are currently ported (such as TestMainBase). I believe porting those items in a series of separate PRs. Tedious, but it will leave a better audit trail. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 is merged and this PR re-based upon it.
LeeTibbert
added a commit
to LeeTibbert/scala-native-fork
that referenced
this pull request
Nov 29, 2020
This PR builds upon merged PR scala-native#1937 by porting Collection.scala and its corresponding test from Scala.js. The test was ported from Scala.js by Lorenzo G (lolgab) as part of his PR scala-native#1994. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation. This PR is WIP because it will fail to build until after PR scala-native#1997 (nscplugin), scala-native#2009 (j.l.Iterable), & 2010 (TrivialCollection) are merged and this PR is re-based.
ekrich
pushed a commit
to ekrich/scala-native
that referenced
this pull request
May 21, 2021
ekrich
pushed a commit
to ekrich/scala-native
that referenced
this pull request
May 21, 2021
This PR builds upon merged PR scala-native#1937 by porting j.u.f.Predicate.scala and its corresponding PredicateTest from Scala.js. The previously existing Predicate.scala is overwritten to keep the source and its test synchronized. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
WojciechMazur
pushed a commit
to WojciechMazur/scala-native
that referenced
this pull request
Aug 25, 2021
WojciechMazur
pushed a commit
to WojciechMazur/scala-native
that referenced
this pull request
Aug 25, 2021
This PR builds upon merged PR scala-native#1937 by porting j.u.f.Predicate.scala and its corresponding PredicateTest from Scala.js. The previously existing Predicate.scala is overwritten to keep the source and its test synchronized. See Issue scala-native#1972 for background & discussion of JavaDefaultMethod annotation.
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.
This PR provides the missing remove() default method. This method is used
by the Scala.js TestMainBase hierarchy. Having this method,
along with previous PR Add j.l.Iterable.forEach #1934 allows JUnit CollectionsTest.scala
and others to link and execute, with the expected zero tests run.
For completeness, this PR also provides the forEachRemaining()
default method. It is not used by the TestMainBase hierarchy
and could be deferred to a separate PR. The overall project cost of
including it here seemed to be less than the cost of a separate PR.
The effective change is in Iterator.scala. Because it now provides
a default message, a number of other files need overrides. There
should be no functional change.
There is no direct corresponding JUnit test for remove() because
of circularity. This method is used by the environment which would test any
standalone file. These changes will be extensively exercised
by that test environment and defects will become obvious.
forEachRemaining() has a test in Scala.js IteratorTest.scala. That
change in this PR Will become publicly tested when the current work to port
the TestMainBase environment finishes. Until then, it is being heavily
exercised in my porting environment.
Documentation:
Testing:
Safety -
X86_64 only . All tests pass.
Efficacy -
to Scala Native has been accomplished.