-
Notifications
You must be signed in to change notification settings - Fork 1.1k
sync the history from scala/scala
to scala/scala3
#24062
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
Closed
Closed
Conversation
This file contains hidden or 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
…r-slice Improve check for empty vector slice
Lint for integral divisions that are widened to a float [forward port from 2.12]
Signed-off-by: Liang Yan <ckgppl_yan@sina.cn>
This fixes scala/bug#8938 for Scala 2.12 in a way that is compatible with the behavior of 2.13 introduced in 4a4dd1d. - Relevant test suite parts taken verbatim from the 2.13 version, with one exception: I did not modify the messages of wrapped exceptions, therefore PromiseTests expects the name "Boxed InterruptedException" (as used in `Promise.resolver` in 2.12) instead of "Boxed Exception". - The actual implementation is not based on 2.13, which was a major rewrite that cannot be applied cleanly to 2.12 and is not fully source or binary compatible. Instead I implemented a strategic fix in as simple a way as possible.
Seq.isEmpty is lengthCompare and IndexedSeq has efficient length aka knownSize. headOption already uses isEmpty.
This is a follow-up of the comment in #15766 (comment) to try and make it clear to Scala 3 users that while this API exists and is visible in Scala 3, it's not supported by the actual compiler. Therefore it's recommended to instead use the `inline if` alternative. This just adds a note to the Scaladoc to that effect. refs: #15766
If the new elements are added to the end, `last0` needs to be updated. `insertAfter` is used in `patchInPlace` and `insertAll`, but the bug didn't manifest for `insertAll` because it delegates to `addAll` when adding to the end.
When converter destination collection does not have equality defined, we should override equals/hashcode. 2 wrappers with same underlying collection should be equal.
Add explicit result type to methods where Scala 2 and Scala 3 disagree with the inferred type. The aim is to have the same type in the Scala 2 pickles and the Scala 3 TASTy. These where identified in #17975
IndexedSeq.head throws NoSuchElementException
…result-types Add explicit result type to some non-private methods
Fix ListBuffer.insertAfter, used in patchInPlace
Comment on private ListBuffer.locate [ci: last-only]
…sage Use List.fill instead of range [ci: last-only]
…array IterableOnce#copyToArray uses helper for count [ci: last-only]
This fixes scala/scala#13108 when comparing Seq[Float] with Seq[Float] it expected that Float.NaN != Float.NaN and 0.0 equals -0.0f. But before this patch this was violated by ArraySeq.ofFloat/ofDouble
Fix ArraySeq.ofFloat/ofDouble.equals for floating point
Extract branches to be mostly dependent on `isInclusive` and `step >= 0`. These are often constant, and when they're not statically constant, they are probably predictable anyway. This commit upstreams scala-js/scala-js@a5337ed from Scala.js.
Previously, `Range` used a number of intermediate operations on `Long`s to avoid overflow. We can streamline a lot of code by using unsigned `Int` arithmetics. In particular, there is only 1 division in the initialization path, instead of 3. Although the fields have not changed, the content of `numRangeElements` is more strict for overfull ranges. This means that deserializing an overfull range from a previous version would not be safe. This is why we bump the SerialVersionUID. This commit upstreams scala-js/scala-js@d972218 from Scala.js.
Avoid evaluating `value0` twice on completed Futures for performance.
perf: avoid double checking `value0` Future.
441956d
to
990382f
Compare
I'm starting over. |
hamzaremmal
added a commit
that referenced
this pull request
Sep 25, 2025
Superseed #24062 Steps to reproduce: ```shell git clone git@github.com:scala/scala.git --single-branch --no-tags --branch 2.13.x embed cd embed git filter-repo --path src/library --path-rename src/library:library/src git filter-repo --message-callback 'return re.sub(rb"(?<!\w)#(\d+)", rb"scala/scala#\1", message)' git remote add scala3 git@github.com:scala/scala3.git git fetch scala3 git replace --graft b594c22eac364ca2449a2700506b4f6b3f571b86 2308509 git filter-repo --proceed git checkout -b stdlib-history git checkout -b sync-24-09-2025 scala3/main git merge stdlib-history # Also fix the two conflicts that occurred git push scala3 ```
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 is the first sync between the stdlib of scala 2 and scala 3 after merging the histories.
The steps to reproduce this:
This was done manually, when I have some free time, I will make a workflow to automatically do this.