-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: embed the history of the scala 2 stdlib #23099
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
Draft
hamzaremmal
wants to merge
8,430
commits into
main
Choose a base branch
from
embed-stdlib
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+95,031
−4
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
Minor refactor in ListSet to foreground guards and add test
in the usual places. based on c4ca300, and verified with `git grep -w 2022`
…12.x-to-2.13.x-20230120
…12.x-to-2.13.x-20230120
….13.x-20230120
…gbuilder-doc Tweak class doc for StringBuilder
…rop-on-numeric-ranges Fixes scala/bug#12706
…n-deprecation Honor more deprecations under separate compilation
…r-slice Improve check for empty vector slice
Move Future.onCompleteWithUnregister out of the Future API
…list-doc Boost LazyList Scaladoc just a bit
copied from Seq.scala
add documentation for Iterator.indexWhere
collections Scaladoc: fix an awkward wording
The `ScalaRunTime.wrap*Array` methods are exclusively used by the codegen for varargs. They are always called with fresh (hence non-null) arrays that are non-empty. Therefore, the various code paths handling `null`s and empty arrays were dead code. This commit removes those code paths to simplify those methods and streamline varargs call sites.
…rapping Simplify the run-time wrappers of arrays for use in varargs.
Since 2.13, case class `hashCode` mixes in the hash code of the `productPrefix` string. This is inconsistent with the `equals` method, subclasses of case classes that override `productPrefix` compare equal but have a different `hashCode`. This commit changes `hashCode` to mix in the `productPrefix.hashCode` statically instead of invoking `productPrefix` at runtime. For case classes without primitive fields, the synthetic `hashCode` invokes `ScalaRunTime._hashCode`, which mixes in the result of `productPrefix`. To fix that, the synthetic hashCode is changed to invoke `MurmurHash3.productHash` directly and mix in the name to the seed statically. This works out with keeping `productHash` forwards and backwards compatible. The `MurmurHash3.productHash` method is deprecated / renamed to `caseClassHash`. This method computes the same hash as the synthetic `hashCode`, except for the corner case where a case class (or a subclass) override the `productPrefix`. In this case, the case class name needs to be passed manually to `caseClassHash`.
Change `scala.util.Using` to have `scala.util.control.ControlThrowable` be suppressed by non-fatal exceptions (`scala.util.control.NonFatal`).
Mix in the `productPrefix` hash statically in case class `hashCode`
Improve `s.u.Using` suppression order
The default implementation of `Iterable.sliding` via `Iterator.sliding` is rather inefficient and can benefit greatly from `IndexedSeq`-specific optimizations. The new `IndexedSeqSlidingIterator` provides a `slice`-based implementation of the basic functionality without any of the additional features of `GroupedIterator` (which is only exposed as a return type in `Iterator` but not in `Iterable`). Co-authored-by: Som Snytt <som.snytt@gmail.com>
A fast sliding iterator for IndexedSeqs
Update Option examples to more modern style
…-doc Find more doc vars and distinguish C from CC [ci: last-only]
Allow selector aliasing Drill thru this selections Reduce obsolete use of NoWarnAttachment Use the attachment to avoid warning when the user wrote underscore; the position will be opaque, although the fresh name is longer than the span. For good measure, also avoid warning about fresh names. PatVarDef members warn under -Wunused:patvars Drop local from patvar names No warn if patvar has public accessor Ignore annotation params No warn unit-valued params No warn this is trivial util.WeakHashSet respects load factor
Collect nowarn symbols instead of skipping them
Tweak partial function doc
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.
Here are the steps I followed: