Skip to content

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
wants to merge 8,430 commits into
base: main
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
8430 commits
Select commit Hold shift + click to select a range
d544bb3
Minor refactor in ListSet to foreground guards and add test
som-snytt Mar 1, 2022
96b9397
Merge pull request scala/scala#10248 from som-snytt/tweak/12316
lrytz Dec 23, 2022
f9a2497
bump copyright year to 2023
SethTisue Jan 5, 2023
2c7bbac
Merge pull request scala/scala#10254 from SethTisue/copyright-2023
SethTisue Jan 10, 2023
e0fb323
Merge commit '96b9397e0ca4a9eae4e79ab2cde28fb21d540863' into merge-2.…
SethTisue Jan 21, 2023
cb1f977
Merge commit '2c7bbac05226cda70c150390001505fd1570b0ae' into merge-2.…
SethTisue Jan 21, 2023
f728c57
Merge pull request scala/scala#10270 from SethTisue/merge-2.12.x-to-2…
SethTisue Jan 23, 2023
aa6ef69
Fix typo, traitss -> traits
GeorgiChochov Jan 30, 2023
9d34341
Tweak class doc for StringBuilder
som-snytt Feb 5, 2023
b16c52f
Update overview/collections URL in doc
som-snytt Feb 5, 2023
de6985f
Replace removeFirst with removeHead in ArrayDeque documentation
JD557 Feb 5, 2023
a6b4252
Merge pull request scala/scala#10293 from som-snytt/issue/12710-strin…
som-snytt Feb 10, 2023
fdbd1f0
Prefer override protected, partest tweaks
som-snytt Feb 10, 2023
78ba5dc
Improve doc of Seq.sortWith
som-snytt Feb 5, 2023
d71a682
String multiplification fix
som-snytt Feb 17, 2023
49bbaf2
Implemented crossesTheEndAfterN, and used it in take and drop
AminMal Feb 18, 2023
b38fa9c
Merge pull request scala/scala#10259 from AminMal/issues/12706-take-d…
SethTisue Feb 20, 2023
d38fed1
Merge pull request scala/scala#10291 from som-snytt/issue/12714-kotli…
lrytz Feb 21, 2023
8efe110
Lint for integral divisions that are widened to a float
lrytz Feb 14, 2023
a70e287
Merge commit 'e66a4617c9' into merge-2.12-to-2.13-20230227
SethTisue Feb 27, 2023
d53bdec
Merge pull request scala/scala#10332 from SethTisue/merge-2.12-to-2.1…
SethTisue Feb 28, 2023
10f6889
Merge pull request scala/scala#10313 from lrytz/div-to-float
SethTisue Mar 8, 2023
f18bb4d
get tests passing on JDK 20
SethTisue Mar 6, 2023
0ea0a4d
Merge pull request scala/scala#10335 from SethTisue/restarr-jdk20
SethTisue Mar 9, 2023
edf245d
Merge pull request scala/scala#10296 from JD557/patch-1
SethTisue Mar 13, 2023
94a5fac
Improve check for empty vector slice
som-snytt Feb 27, 2023
c06a80a
Merge pull request scala/scala#10331 from som-snytt/issue/12739-vecto…
som-snytt Mar 15, 2023
5b5b479
Revert deprecation exclusion for companion
som-snytt Feb 14, 2023
985ec14
Merge commit '4b1dc0b60a' into merge-2.12-to-2.13-20230405
SethTisue Apr 5, 2023
482cfe0
Merge pull request scala/scala#10367 from SethTisue/merge-2.12-to-2.1…
SethTisue Apr 8, 2023
dbc8a27
Deprecate integral isWhole
som-snytt Apr 8, 2023
942f77f
Merge pull request scala/scala#10369 from som-snytt/forward/int-div
lrytz Apr 11, 2023
4ae695b
Update LinkedHash{Map,Set} from factory method
liang3zy22 Apr 12, 2023
f404ff1
InterruptedException handling for Futures
szeiger Apr 24, 2023
e932f9c
Add caveat for global context to Future
som-snytt Apr 26, 2023
4c52b44
Translate outbound IndexOutOfBounds in IndexedSeq.head
som-snytt May 4, 2023
78da69f
IndexedSeq.head uses isEmpty
som-snytt May 4, 2023
93528af
docs: add in a note about elidable not being supported in Scala 3
ckipp01 May 24, 2023
36fde5d
Fix ListBuffer.insertAfter, used in patchInPlace
lrytz May 31, 2023
2276c4a
Interrupt current thread after completing Future
szeiger Jun 2, 2023
983aed8
Define equality between converter wrappers
RustedBones Jun 8, 2023
7bb1f21
IteratorTest mustn't use iterator after terminal op
som-snytt Jun 12, 2023
5cedc48
Make package object -Xsource:3 friendly
som-snytt Jun 16, 2023
49835f4
Add missing equals definition on DictionaryWrapper
RustedBones Jun 20, 2023
43ca97f
Add explicit result type to some non-private methods
nicolasstucki Jun 16, 2023
b0caf0f
Merge pull request scala/scala#10392 from som-snytt/issue/12782-head
som-snytt Jun 23, 2023
20a42f6
Merge pull request scala/scala#10435 from nicolasstucki/add-explicit-…
som-snytt Jun 23, 2023
8232eea
Merge pull request scala/scala#10416 from lrytz/t12796
som-snytt Jun 23, 2023
9680f2f
Add explicit result type to some non-private methods
nicolasstucki Jun 26, 2023
1c5a3b2
Tweak deprecation of array conversion
som-snytt Jul 4, 2023
6d28de3
Merge pull request scala/scala#10455 from som-snytt/issue/12199-message
lrytz Jul 4, 2023
6c3d002
More type annotations where inferred type changes under `-Xsoruce:3`
lrytz Jul 4, 2023
758188c
Merge pull request scala/scala#10444 from nicolasstucki/add-explicit-…
lrytz Jul 4, 2023
58fc63d
Merge pull request scala/scala#10429 from som-snytt/tweak/iterator-test
lrytz Jul 5, 2023
c5364e9
Trailing escape is error in command parser
som-snytt Jul 15, 2023
45396a1
Merge pull request scala/scala#10436 from som-snytt/trial/library-xso…
SethTisue Aug 8, 2023
2aa21b2
Resolve TODO in mutable.PriorityQueue: explain why array(0) is not used.
alexleigh Aug 9, 2023
7a67d21
Fix soundness of Map.from and Set.from
som-snytt Mar 7, 2023
7a45b60
Restore ImmutableKeySet test
som-snytt Aug 11, 2023
66648ac
Avoid directly inheriting Iterator
som-snytt Oct 18, 2022
4d87a1c
Merge pull request scala/scala#10437 from som-snytt/deprecate/unabstr…
lrytz Aug 16, 2023
63081ac
Placeholders
som-snytt Aug 8, 2023
074812d
Suspend asserts on array copy count
som-snytt Aug 17, 2023
d2fda97
Merge pull request scala/scala#10496 from som-snytt/tweak/discarded-v…
lrytz Aug 18, 2023
8c1c858
Follow-up for non-warning nilary/nullary override with BeanProperty
lrytz Aug 25, 2023
e590d33
fix: SliceIterator to drop a max of Int.MaxValue
yzia2000 Sep 1, 2023
8b4f237
Avoid weird alias of Int and Long
som-snytt Sep 3, 2023
80b24e9
Fixes issue with blocking and BatchingExecutor
dkomanov Sep 5, 2023
123f3db
Corrected docs of `Map.updatedWith`
rs017991 Sep 8, 2023
df22335
Merge pull request scala/scala#10532 from rs017991/patch-1
som-snytt Sep 9, 2023
c3b683c
align a return type in collections internals with Scala 3
SethTisue Sep 20, 2023
4c429d9
Floor for NewVectorIterator.slice limit
kapunga Aug 28, 2023
b3fffd7
Flaky IteratorTest bails not fails
som-snytt Sep 26, 2023
a4ecfe3
Clarify language.implicitConversions
som-snytt Oct 14, 2023
8feecb2
Merge pull request scala/scala#10564 from som-snytt/issue/10392-langu…
lrytz Oct 16, 2023
fe4a520
Standard extirpolator processes escapes
som-snytt Oct 17, 2023
7ab98a2
Highlight Either#toOption for filtering
som-snytt Oct 27, 2023
a7443ea
Merge pull request scala/scala#10586 from som-snytt/doc/either-filter
lrytz Oct 30, 2023
0a71760
Include implicit Manager example in Using doc
som-snytt Nov 1, 2023
1e1d7f9
Tweak up per review
som-snytt Nov 1, 2023
d2b6e8c
Improve name of default value
som-snytt Nov 2, 2023
51713a3
Type tweaks in Using
som-snytt Nov 3, 2023
6cbe502
Fixes implicit javaBigDecimal2bigDecimal to return null, when a null …
cahilltr Sep 22, 2020
66a7f4a
Merge pull request scala/scala#10591 from som-snytt/tweak/using-this-…
som-snytt Nov 5, 2023
6abe7f4
BigInt conversion checks for null
som-snytt Nov 5, 2023
93602dd
Merge pull request scala/scala#10593 from som-snytt/issue/9176-null-c…
lrytz Nov 6, 2023
0b92994
BigInt conversion checks for null
som-snytt Nov 5, 2023
a6718a3
Merge pull request scala/scala#10590 from som-snytt/doc/getOrElseUpdate
lrytz Nov 6, 2023
f1228bb
Merge pull request scala/scala#10592 from guizmaii/fix_212_javaBigDec…
lrytz Nov 6, 2023
9c2aaa7
Improve doc of dropWhile
som-snytt Nov 7, 2023
566aa42
Merge pull request scala/scala#10598 from som-snytt/issue/12045-drop-…
som-snytt Nov 7, 2023
a203fbe
Tweak Try apply and doc
som-snytt Nov 9, 2023
cea4471
Merge pull request scala/scala#10528 from dkomanov/fix-issue-9304
lrytz Nov 23, 2023
0de975f
Merge commit '0bb1b0430a' into 2.13.x
lrytz Nov 23, 2023
d55dfe9
Merge commit 'cea4471765' into 2.13.x
lrytz Nov 23, 2023
43a4bc7
Merge pull request scala/scala#10609 from lrytz/merge-2.12-nov-23
SethTisue Nov 23, 2023
62c0e6d
Merge pull request scala/scala#10525 from yzia2000/fix/12822
lrytz Nov 29, 2023
c8f5d20
Merge pull request scala/scala#10527 from som-snytt/tweak/stepper-test
lrytz Nov 29, 2023
e1acbb2
Merge pull request scala/scala#10558 from som-snytt/sd/854-flaky-iter…
lrytz Nov 29, 2023
ded003b
Merge pull request scala/scala#10603 from som-snytt/tweak/try-apply-docs
lrytz Nov 29, 2023
cac8d0b
Make `List` documentation more consistent with grammar, formatting
shardulc Nov 29, 2023
1b87eb6
Merge pull request scala/scala#10616 from shardulc/scaladoc/list-cons…
lrytz Dec 1, 2023
9c77ce7
Lint unnamed boolean literal args
som-snytt Jul 3, 2020
93eb854
Use deprecatedName for some boolean parameters
som-snytt Dec 4, 2023
7ab88fd
Use named literal boolean args in project
som-snytt Dec 4, 2023
826cd4b
Map#keys is alias of keySet and may be a view
som-snytt Sep 20, 2023
9ed412a
Merge pull request scala/scala#10544 from som-snytt/issue/11727-keyse…
lrytz Dec 6, 2023
5c13c92
Add and improve doc
som-snytt Nov 12, 2023
22453d0
Merge pull request scala/scala#10605 from som-snytt/issue/12904-api-doc
som-snytt Dec 6, 2023
a072237
Improvements
som-snytt Dec 7, 2023
3646036
Merge pull request scala/scala#10612 from som-snytt/lint/booleans
lrytz Dec 11, 2023
4170e21
Align ArrayBuilder resizing with ArrayBuffer
Jun 27, 2023
1f61034
Review cleanups
lrytz Dec 13, 2023
152efb0
Merge pull request scala/scala#10448 from dragonfly-ai/2.13.x
som-snytt Dec 14, 2023
8a0cbcd
Tweak inline doc
som-snytt Dec 18, 2023
e16706c
Merge pull request scala/scala#10636 from som-snytt/tweak/7349-opt-fo…
lrytz Dec 18, 2023
fc420ca
Fix RedBlackTree.doFrom / doTo / doUntil
lrytz Dec 15, 2023
70f063d
Avoid completableFuture.asScala crash for MinimalStage
lrytz Nov 30, 2023
fac9625
Deprecate use of @Deprecated
lrytz Dec 19, 2023
848337d
[backport] Fix RedBlackTree.doFrom / doTo / doUntil
lrytz Dec 19, 2023
735ba03
Merge pull request scala/scala#10517 from kapunga/12845-use-java-depr…
lrytz Dec 20, 2023
9b42170
Revert maladapted ArrayBuffer builder
som-snytt Dec 22, 2023
5220119
Restore delegation of sizeHint
som-snytt Dec 22, 2023
b32c9dd
Improve doc for sizeHint
som-snytt Dec 22, 2023
c54a92c
Audit sizeHint
som-snytt Dec 22, 2023
50995d9
Merge pull request scala/scala#10642 from som-snytt/followup/array-bu…
SethTisue Dec 22, 2023
3cd2dfe
Add indexOf() and lastIndexOf() to NumericRange.
Dec 24, 2023
afc5afb
Size hint with delta is not negative
som-snytt Jan 4, 2024
7d2b16b
bump copyright year to 2024
SethTisue Jan 8, 2024
fd7416e
Tweak library
som-snytt Jan 8, 2024
5416735
Partial Functions resisting
som-snytt Jan 9, 2024
491a329
Merge pull request scala/scala#10379 from szeiger/wip/future-interrupt
SethTisue Jan 18, 2024
252908a
Merge pull request scala/scala#10632 from lrytz/t12921
SethTisue Jan 18, 2024
c79ff64
Merge pull request scala/scala#10640 from lrytz/t12921-backport
SethTisue Jan 18, 2024
90aba35
Merge commit '93f3e0ef61' into merge-2.12-to-2.13-20240118
SethTisue Jan 18, 2024
36147c3
Merge commit 'c79ff644db' into merge-2.12-to-2.13-20240118
SethTisue Jan 18, 2024
b5da916
Merge pull request scala/scala#10667 from SethTisue/merge-2.12-to-2.1…
lrytz Jan 19, 2024
a6bfe5c
Merge pull request scala/scala#10627 from GerretS/Add-indexOf-to-Nume…
lrytz Jan 19, 2024
6da44c5
Warn more constant inexactitude
som-snytt Jan 25, 2024
4c8df1a
Scaladoc: Fix underspecn. of folds, reduces re. associativity and ord…
shardulc Dec 6, 2023
665d6a9
Mild refactor for reading
som-snytt Feb 7, 2024
37e07bf
Handle empty test and NxD in subsetOf
som-snytt Feb 7, 2024
3d7dde4
Merge pull request scala/scala#10683 from som-snytt/issue/12944-hashs…
lrytz Feb 8, 2024
d3828ab
fix signautre of HashSet.subsetOf
lrytz Feb 8, 2024
d4e7f58
Merge pull request scala/scala#10684 from lrytz/hs-subset
som-snytt Feb 8, 2024
aab037f
Memoize osName properties and use assumeFalse, noWin
som-snytt Feb 13, 2024
d79ce29
Change description to match parameter name
aamiguet Mar 24, 2024
34bc424
Merge pull request scala/scala#10724 from aamiguet/change-description
som-snytt Mar 24, 2024
9134f98
Defer array resize on empty
som-snytt Mar 21, 2024
9e4a4c6
chore: remove repetitive words
guqicun Apr 6, 2024
6115e09
Merge pull request scala/scala#10737 from guqicun/2.13.x
SethTisue Apr 8, 2024
a1d9238
Move terminal test to properties
som-snytt Apr 13, 2024
0cb893f
[backport] Console.isTerminal on JDK 22
som-snytt Apr 13, 2024
5de064e
Merge pull request scala/scala#10754 from som-snytt/backport/sd-867
SethTisue Apr 15, 2024
6845f54
Merge pull request scala/scala#10753 from som-snytt/test/fixup
SethTisue Apr 15, 2024
47295a9
Minimize diff for isTerminal probe
som-snytt Apr 16, 2024
a4be3e8
Merge pull request scala/scala#10758 from som-snytt/fix/repl-color-redux
lrytz Apr 17, 2024
db22f49
Backport PR 10758 to 2.12
lrytz Apr 17, 2024
43a7283
Merge pull request scala/scala#10759 from lrytz/backport-10758
lrytz Apr 17, 2024
e3c1618
Add test and fix for initialization cycle
Jun 12, 2024
2188ebe
Empty iterator must not mutate
som-snytt Jul 14, 2024
7ad4f4e
compile library with scala 3.5.0-RC4
bishabosha Jul 17, 2024
6bbb339
Merge commit '1cb2e87835' into merge-2.12-to-2.13-20240805
SethTisue Aug 7, 2024
52e3e82
Merge pull request scala/scala#10825 from SethTisue/merge-2.12-to-2.1…
lrytz Aug 7, 2024
fe71e70
Fix bug in new mask computation, in mutable LongMap
samuelchassot Jul 23, 2024
8323af9
Track aliased patvars in for comprehension
som-snytt Jun 26, 2024
f9d396f
Merge pull request scala/scala#10812 from som-snytt/issue/10287-for-w…
som-snytt Aug 13, 2024
fd8087d
Improve `LazyList` self-reference error
NthPortal Jul 26, 2024
7589e80
Merge pull request scala/scala#10818 from NthPortal/ll-better-error/PR
lrytz Aug 14, 2024
6082118
Fix typo in collection.mutable.Builder
hamzaremmal Sep 12, 2024
6abc68f
Merge pull request scala/scala#10861 from hamzaremmal/scala3-backport
dwijnand Sep 12, 2024
b1790e4
Remove spurious return
som-snytt Sep 28, 2024
2513452
Use extracted computation
som-snytt Sep 28, 2024
5855291
Merge pull request scala/scala#10871 from som-snytt/tweak/try-return
lrytz Oct 10, 2024
9093356
Fix typo in collection.Iterable
hamzaremmal Oct 4, 2024
03b265b
Merge pull request scala/scala#10877 from hamzaremmal/port-21692
lrytz Oct 22, 2024
c12c948
Do not use rangeHash when rangeDiff is 0
Friendseeker Nov 5, 2024
ff99c2e
remove @implicitNotFound on Ordering
SethTisue Nov 5, 2024
7d6e6e1
Throw exception on init last when empty string
sh0hei Aug 31, 2024
449a7c5
Document different behavior of BeanProperty in Scala 3
SethTisue Nov 6, 2024
c004971
Merge pull request scala/scala#10918 from SethTisue/issue-12870
SethTisue Nov 7, 2024
ea9c2ce
Merge pull request scala/scala#10913 from SethTisue/issue-13053
SethTisue Nov 7, 2024
49d6dba
Clean up control.TailCalls
som-snytt May 22, 2020
6e52acb
Fix reentrancy issue in LongMap/AnyRefMap.getOrElseUpdate
lrytz Nov 11, 2024
e7bd9a2
Concat SliceIterator on drop overflow
som-snytt Oct 28, 2024
8a0ff17
Merge pull request scala/scala#10912 from Friendseeker/range-hash-fix
lrytz Nov 12, 2024
1954ca6
Merge pull request scala/scala#10919 from som-snytt/review/tailcalls
lrytz Nov 12, 2024
dff2675
Merge pull request scala/scala#10903 from som-snytt/issue/13052-slice…
lrytz Nov 13, 2024
f31a7c4
Extract common IndexOutOfBoundsException error message
JD557 Nov 17, 2024
d5cf2d8
Merge pull request scala/scala#10928 from JD557/extract-ioob-message
sjrd Nov 22, 2024
f4e7bcf
Fix `BigInt#testBit` to throw `ArithmeticException` when `n` is negat…
tanishiking Nov 22, 2024
a4a5033
Merge pull request scala/scala#10930 from tanishiking/fix-bigint-testbit
lrytz Nov 22, 2024
e54d7e4
Merge pull request scala/scala#10851 from sh0hei/throw-exception-empt…
som-snytt Nov 25, 2024
17f4510
Merge pull request scala/scala#10924 from lrytz/t13048
lrytz Dec 11, 2024
6f03d7a
ArrayBuilder of Unit needs addAll forwarded
som-snytt Dec 13, 2024
47af6d7
Prefer RuntimeException for runtime exceptions
som-snytt Dec 13, 2024
334252c
Deprecate mutable.AnyRefMap
wangyum Sep 15, 2024
7e58d87
Merge pull request scala/scala#10862 from wangyum/AnyRefMap
SethTisue Dec 17, 2024
ea3084c
update copyrights to 'Lightbend, Inc. dba Akka'
SethTisue Dec 12, 2024
8735275
Merge pull request scala/scala#10953 from SethTisue/dba-akka
SethTisue Dec 19, 2024
e1a11db
Merge remote-tracking branch 'origin/2.12.x' into merge-2.12-to-2.13-…
SethTisue Dec 19, 2024
7832a06
Merge pull request scala/scala#10960 from SethTisue/merge-2.12-to-2.1…
SethTisue Dec 19, 2024
d46e341
remove 2.10 references in library docs
coreyoconnor Jan 3, 2025
fb8da46
Merge pull request scala/scala#10971 from coreyoconnor/remove-2-10-re…
SethTisue Jan 6, 2025
83fdab7
bump copyright year to 2025
SethTisue Jan 6, 2025
9bc5048
Merge pull request scala/scala#10973 from SethTisue/copyright-2025
SethTisue Jan 6, 2025
42eb1b2
Merge remote-tracking branch 'origin/2.12.x' into merge-2.12-to-2.13-…
SethTisue Jan 6, 2025
0d8507a
Improve Array.copy performance
bbrehm Dec 20, 2024
971cabc
improve ArrayBuffer.addOne performance
bbrehm Jan 10, 2025
0a59320
REPL: on Windows, allow default `-Dscala.color=auto` to show colors
philwalk Jan 9, 2025
01ff752
Merge pull request scala/scala#10979 from philwalk/fix-for-scala/scal…
SethTisue Jan 16, 2025
dcfe0a0
Show nowarn / Wconf filters for a warning with @nowarn("verbose")
lrytz Jan 20, 2025
fef0086
Merge pull request scala/scala#10981 from bbrehm/bbrehm/arraybufferIn…
lrytz Jan 21, 2025
c2e83f7
Add type annotations in repo
lrytz Nov 29, 2024
528cd27
-Xsource-features:no-infer-structural
lrytz Dec 11, 2024
ba2055e
Merge pull request scala/scala#10985 from lrytz/nowarnV
lrytz Jan 30, 2025
962562a
Merge pull request scala/scala#10942 from lrytz/lint-structural
lrytz Jan 30, 2025
b2dcd69
Deregister stale callbacks in `Future.firstCompletedOf`
lrytz Nov 15, 2024
3a84ff3
Reduce memory footprint of evaluated values in LazyList
lrytz Dec 2, 2024
d699135
Merge pull request scala/scala#10937 from lrytz/t13062
lrytz Jan 31, 2025
0fa510a
Encode default args of annotations in a meta annotation
lrytz Jan 8, 2025
2de6f93
Add support for user-defined annotation subclasses
lrytz Jan 13, 2025
4a2925a
Boost LazyList Scaladoc just a bit
som-snytt Jan 31, 2025
e15e9c3
Move Future.onCompleteWithUnregister out of the Future API
lrytz Feb 7, 2025
46098b0
Merge pull request scala/scala#10994 from lrytz/t13058-default
lrytz Feb 12, 2025
7458a28
Merge pull request scala/scala#10990 from som-snytt/issue/10370-lazy-…
som-snytt Feb 24, 2025
c0b9600
add documentation for Iterator.indexWhere
mlutze Feb 6, 2025
21fd74a
Merge pull request scala/scala#10992 from mlutze/patch-1
SethTisue Feb 25, 2025
ce1dab9
collections Scaladoc: fix an awkward wording
SethTisue Mar 5, 2025
5d9a65d
Merge pull request scala/scala#11008 from SethTisue/not-copied
SethTisue Mar 6, 2025
282d5bc
Override TreeMap.{apply,contains} to avoid allocation
retronym Mar 8, 2025
bee8dcb
Simplify the run-time wrappers of arrays for use in varargs.
sjrd Mar 18, 2025
5db19db
Merge pull request scala/scala#11021 from sjrd/simplify-varargs-seq-w…
lrytz Mar 20, 2025
a31a5fe
Mix in the `productPrefix` hash statically in case class `hashCode`
lrytz Sep 10, 2024
6ba3a2c
Remove obsolete constants and backticks
som-snytt Mar 28, 2025
3d60f54
Improve `s.u.Using` suppression order
NthPortal Feb 18, 2025
0b53939
Merge pull request scala/scala#11023 from lrytz/t13033b
lrytz Apr 3, 2025
62d069e
Merge pull request scala/scala#11000 from NthPortal/using-pref/PR
lrytz Apr 3, 2025
a859e38
Find more doc vars and distinguish C from CC
som-snytt Nov 8, 2022
dfdd7fd
Use ccoll and align margins
som-snytt Mar 31, 2025
6755b3e
Faster sliding for IndexedSeq
szeiger Jul 6, 2020
6735bbe
Merge pull request scala/scala#11029 from som-snytt/wip/indexed-sliding
som-snytt Apr 14, 2025
02f1857
Update Option examples to more modern style
lolgab Apr 14, 2025
403dd83
Merge pull request scala/scala#11040 from lolgab/option-docs-style
som-snytt Apr 15, 2025
78d1d31
Lint dubious overload differs only in implicit
som-snytt Mar 30, 2025
a2893eb
Merge pull request scala/scala#10218 from som-snytt/issue/12681-range…
lrytz Apr 15, 2025
9cc5fe2
Collect nowarn symbols instead of skipping them
som-snytt Mar 10, 2025
0fe5449
Tweak partial function doc
som-snytt Apr 15, 2025
f208bf3
Merge pull request scala/scala#11012 from som-snytt/issue/13095-patvar
som-snytt Apr 16, 2025
7a75a09
Merge pull request scala/scala#11041 from som-snytt/doc/pf
lrytz Apr 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 47 additions & 0 deletions library/src/rootdoc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
This is the documentation for the Scala standard library.

== Package structure ==

The [[scala]] package contains core types like [[scala.Int `Int`]], [[scala.Float `Float`]], [[scala.Array `Array`]]
or [[scala.Option `Option`]] which are accessible in all Scala compilation units without explicit qualification or
imports.

Notable packages include:

- [[scala.collection `scala.collection`]] and its sub-packages contain Scala's collections framework
- [[scala.collection.immutable `scala.collection.immutable`]] - Immutable, sequential data-structures such as
[[scala.collection.immutable.Vector `Vector`]], [[scala.collection.immutable.List `List`]],
[[scala.collection.immutable.Range `Range`]], [[scala.collection.immutable.HashMap `HashMap`]] or
[[scala.collection.immutable.HashSet `HashSet`]]
- [[scala.collection.mutable `scala.collection.mutable`]] - Mutable, sequential data-structures such as
[[scala.collection.mutable.ArrayBuffer `ArrayBuffer`]],
[[scala.collection.mutable.StringBuilder `StringBuilder`]],
[[scala.collection.mutable.HashMap `HashMap`]] or [[scala.collection.mutable.HashSet `HashSet`]]
- [[scala.collection.concurrent `scala.collection.concurrent`]] - Mutable, concurrent data-structures such as
[[scala.collection.concurrent.TrieMap `TrieMap`]]
- [[scala.concurrent `scala.concurrent`]] - Primitives for concurrent programming such as
[[scala.concurrent.Future `Futures`]] and [[scala.concurrent.Promise `Promises`]]
- [[scala.io `scala.io`]] - Input and output operations
- [[scala.math `scala.math`]] - Basic math functions and additional numeric types like
[[scala.math.BigInt `BigInt`]] and [[scala.math.BigDecimal `BigDecimal`]]
- [[scala.sys `scala.sys`]] - Interaction with other processes and the operating system
- [[scala.util.matching `scala.util.matching`]] - [[scala.util.matching.Regex Regular expressions]]

Other packages exist. See the complete list on the right.

Additional parts of the standard library are shipped as separate libraries. These include:

- [[https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/index.html `scala.reflect`]] - Scala's reflection API (scala-reflect.jar)
- [[https://github.com/scala/scala-xml `scala.xml`]] - XML parsing, manipulation, and serialization (scala-xml.jar)
- [[https://github.com/scala/scala-parallel-collections `scala.collection.parallel`]] - Parallel collections (scala-parallel-collections.jar)
- [[https://github.com/scala/scala-parser-combinators `scala.util.parsing`]] - Parser combinators (scala-parser-combinators.jar)
- [[https://github.com/scala/scala-swing `scala.swing`]] - A convenient wrapper around Java's GUI framework called Swing (scala-swing.jar)

== Automatic imports ==

Identifiers in the scala package and the [[scala.Predef `scala.Predef`]] object are always in scope by default.

Some of these identifiers are type aliases provided as shortcuts to commonly used classes. For example, `List` is an alias for
[[scala.collection.immutable.List `scala.collection.immutable.List`]].

Other aliases refer to classes provided by the underlying platform. For example, on the JVM, `String` is an alias for `java.lang.String`.
58 changes: 58 additions & 0 deletions library/src/scala/AnyVal.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc. dba Akka
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

package scala

/** `AnyVal` is the root class of all ''value types'', which describe values
* not implemented as objects in the underlying host system. Value classes
* are specified in Scala Language Specification, section 12.2.
*
* The standard implementation includes nine `AnyVal` subtypes:
*
* [[scala.Double]], [[scala.Float]], [[scala.Long]], [[scala.Int]], [[scala.Char]],
* [[scala.Short]], and [[scala.Byte]] are the ''numeric value types''.
*
* [[scala.Unit]] and [[scala.Boolean]] are the ''non-numeric value types''.
*
* Other groupings:
*
* - The ''subrange types'' are [[scala.Byte]], [[scala.Short]], and [[scala.Char]].
* - The ''integer types'' include the subrange types as well as [[scala.Int]] and [[scala.Long]].
* - The ''floating point types'' are [[scala.Float]] and [[scala.Double]].
*
* A subclass of `AnyVal` is called a ''user-defined value class''
* and is treated specially by the compiler. Properly-defined user value classes provide a way
* to improve performance on user-defined types by avoiding object allocation at runtime, and by
* replacing virtual method invocations with static method invocations.
*
* User-defined value classes which avoid object allocation...
*
* - must have a single `val` parameter that is the underlying runtime representation.
* - can define `def`s, but no `val`s, `var`s, or nested `trait`s, `class`es or `object`s.
* - typically extend no other trait apart from `AnyVal`.
* - cannot be used in type tests or pattern matching.
* - may not override `equals` or `hashCode` methods.
*
* A minimal example:
* {{{
* class Wrapper(val underlying: Int) extends AnyVal {
* def foo: Wrapper = new Wrapper(underlying * 19)
* }
* }}}
*
* It's important to note that user-defined value classes are limited, and in some circumstances,
* still must allocate a value class instance at runtime. These limitations and circumstances are
* explained in greater detail in the [[https://docs.scala-lang.org/overviews/core/value-classes.html Value Classes and Universal Traits]].
*/
abstract class AnyVal extends Any {
def getClass(): Class[_ <: AnyVal] = null
}
25 changes: 25 additions & 0 deletions library/src/scala/AnyValCompanion.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc. dba Akka
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

package scala

/** A common supertype for companion classes of primitive types.
*
* A common trait for /companion/ objects of primitive types comes handy
* when parameterizing code on types. For instance, the specialized
* annotation is passed a sequence of types on which to specialize:
* {{{
* class Tuple1[@specialized(Unit, Int, Double) T]
* }}}
*
*/
private[scala] trait AnyValCompanion extends Specializable { }
104 changes: 104 additions & 0 deletions library/src/scala/App.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc. dba Akka
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

package scala

import java.lang.System.{currentTimeMillis => currentTime}

import scala.annotation.nowarn
import scala.collection.mutable.ListBuffer

/** The `App` trait can be used to quickly turn objects
* into executable programs. Here is an example:
* {{{
* object Main extends App {
* Console.println("Hello World: " + (args mkString ", "))
* }
* }}}
*
* No explicit `main` method is needed. Instead,
* the whole class body becomes the “main method”.
*
* `args` returns the current command line arguments as an array.
*
* ==Caveats==
*
* '''''It should be noted that this trait is implemented using the [[DelayedInit]]
* functionality, which means that fields of the object will not have been initialized
* before the main method has been executed.'''''
*
* Future versions of this trait will no longer extend `DelayedInit`.
*
* In Scala 3, the `DelayedInit` feature was dropped. `App` exists only in a limited form
* that also does not support command line arguments and will be deprecated in the future.
*
* [[https://docs.scala-lang.org/scala3/book/methods-main-methods.html @main]] methods are the
* recommended scheme to generate programs that can be invoked from the command line in Scala 3.
*
* {{{
* @main def runMyProgram(args: String*): Unit = {
* // your program here
* }
* }}}
*
* If programs need to cross-build between Scala 2 and Scala 3, it is recommended to use an
* explicit `main` method:
* {{{
* object Main {
* def main(args: Array[String]): Unit = {
* // your program here
* }
* }
* }}}
*/
@nowarn("""cat=deprecation&origin=scala\.DelayedInit""")
trait App extends DelayedInit {

/** The time when the execution of this program started, in milliseconds since 1
* January 1970 UTC. */
final val executionStart: Long = currentTime

/** The command line arguments passed to the application's `main` method.
*/
protected final def args: Array[String] = _args

private[this] var _args: Array[String] = _

private[this] val initCode = new ListBuffer[() => Unit]

/** The init hook. This saves all initialization code for execution within `main`.
* This method is normally never called directly from user code.
* Instead it is called as compiler-generated code for those classes and objects
* (but not traits) that inherit from the `DelayedInit` trait and that do not
* themselves define a `delayedInit` method.
* @param body the initialization code to be stored for later execution
*/
@deprecated("the delayedInit mechanism will disappear", "2.11.0")
override def delayedInit(body: => Unit): Unit = {
initCode += (() => body)
}

/** The main method.
* This stores all arguments so that they can be retrieved with `args`
* and then executes all initialization code segments in the order in which
* they were passed to `delayedInit`.
* @param args the arguments passed to the main method
*/
final def main(args: Array[String]) = {
this._args = args
for (proc <- initCode) proc()
if (util.Properties.propIsSet("scala.time")) {
val total = currentTime - executionStart
Console.println("[total " + total + "ms]")
}
}
}
Loading