Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
649 commits
Select commit Hold shift + click to select a range
d58145e
Switch vector dot product example to use factory method
starswap May 5, 2026
0de5613
Fixes #20010 Avoid crash on missing TASTy class references (#25908)
odersky May 5, 2026
9b0d9de
Ban unsupported uses of Specialized
starswap May 6, 2026
e2a7e53
Add multiple stages specialized numeric case
starswap May 6, 2026
a5e23c6
Delete some dead code and comments
starswap May 6, 2026
cb3cbde
Fixes #25979: Fix strictEqualityPatternMatching with GADTs (#25980)
soronpo May 6, 2026
4204700
Make sealed abstract java classes exhaustive checkable (#25788)
lalala194 May 6, 2026
bbaf754
Switch to identity denot transformer
starswap May 6, 2026
628e7f3
Merge branch 'main' into ob/fix-repl-exit
SethTisue May 6, 2026
b8210ea
Fix REPL silently exiting after first user input (#25969)
SethTisue May 6, 2026
b8ef4e2
Add missing @param/@tparam/@return Scaladoc tags in scala.collection …
bvenners Feb 26, 2026
eb2e041
Downgrade sbt to 1.12.1 (was 1.12.10) (#25995)
mbovel May 7, 2026
8b76c7f
Fix bridge typing when `erased` precedes a non-erased parameter
tanishiking Apr 23, 2026
4be6c13
Fix #25801: handle TypeDefs in ensureHasSym
claude May 8, 2026
7a6dac1
Move transform functions outside of Transformer
starswap May 6, 2026
beed859
Share specialized trait cache between comp units in a run
starswap May 8, 2026
b2dc934
Fix outstanding bug due to putting types in a set in Specialization
starswap May 8, 2026
91ca6bb
Make two branches the same in transformStatements
starswap May 8, 2026
d041e88
Move transform functions outside of Transformer
starswap May 6, 2026
5adac5c
Save deftrees when copying symbols for ttmap
starswap May 8, 2026
a054958
Treat opaque types better based on standard approach
starswap May 8, 2026
a79100b
Fix coords in inline traits
starswap May 8, 2026
4212cec
Fix qualifier on select in replaceInlinedTraitSymbols
starswap May 8, 2026
52cb4e7
Fix param names in generated constructor
starswap May 8, 2026
8754ef9
Fix spans and coords in specialized traits
starswap May 8, 2026
7cf5ec5
Remove old comment
starswap May 8, 2026
17f8dbc
Fix positions and sources when prematurely inlining specialized inlin…
starswap May 8, 2026
95dfe2a
Process inline and specialized traits before pickling
starswap May 8, 2026
5d9b532
Add convenience toString method
starswap May 8, 2026
cac7520
Fix $ at end of name confuses class loader
starswap May 8, 2026
ebef698
fix 26026: restore type parameter of Option.orNull
olhotak May 9, 2026
93578db
Fix #25943: Track super-calls as call edges in LambdaLift
claude May 9, 2026
9a8c23f
Avoid Java reflection in i25943 run test
claude May 9, 2026
03a6be4
Retrigger CI
claude May 9, 2026
6b08b5a
Fix #25856: position not set crash in implicit search during import q…
claude May 9, 2026
c3e3e42
Collection core (4): fill in missing @param, @tparam, and @return tag…
SethTisue May 10, 2026
dcf7e42
Add specialized trait one parent is inline
starswap May 11, 2026
9fc6f8e
Add missing span / source file
starswap May 11, 2026
0046c0a
Special case treechecker for duplicate impl and sp classes as discuss…
starswap May 11, 2026
e950ecf
Add multiple files separate compilation units test
starswap May 11, 2026
f4f3b1f
Add specialized trait body macro
starswap May 11, 2026
388da41
Add specialized-trait-inline-specialized-instance
starswap May 11, 2026
2f6fb01
Fix collection of specializations as parent types
starswap May 11, 2026
f155e64
Add specialized-trait-list-of-specialized-trait.scala
starswap May 11, 2026
d3e82d2
Add smoke tests for `sbt --client` (#25997)
mbovel May 11, 2026
c977543
Change `typeOfArg` to take `TypedArg` instead of `Arg` (#25418)
mbovel May 11, 2026
e740027
Enable explicit nulls in community build (#23948)
HarrisL2 May 11, 2026
3c718a2
Scoverage: correctly lift wildcard and singleton types (#26049)
anatoliykmetyuk May 12, 2026
056463a
Check that Closures refer to anonymous functions under `-Xcheck-macro…
SolalPirelli May 12, 2026
c213eb6
Scoverage: correctly detect curried constructor applications (#26048)
anatoliykmetyuk May 12, 2026
42d54ff
Fix false-positive pat mat unreachable case warning (#25978)
Gedochao May 12, 2026
dd3660b
fix 26026: restore type parameter of Option.orNull (#26027)
noti0na1 May 12, 2026
21dd6a6
Warn dubious negative literal syntax (#24163)
som-snytt May 12, 2026
eb8ae84
Deduplicate community build projects list (#26054)
SolalPirelli May 12, 2026
53fe203
Consistently use `xCheckMacroAssert` in `QuotesImpl` (#26053)
SolalPirelli May 12, 2026
65a6143
Revert "Add smoke tests for `sbt --client` (#25997)" (#26055)
mbovel May 12, 2026
68e6039
Bump coursier to 2.1.25-M25 (was 2.1.25-M24) (#26057)
Gedochao May 13, 2026
9c10cba
Allow `:help` syntax for all settings (#26052)
SolalPirelli May 13, 2026
9b44ef2
Add a test case extracted out of #25977 (#26058)
Gedochao May 13, 2026
dfd481f
Simplify readme (#26059)
SolalPirelli May 13, 2026
a530cc2
Improve Scaladoc for `Tuple#map` (#26060)
SethTisue May 14, 2026
2bae53b
Fix bridge typing when `erased` precedes a non-erased parameter (#26047)
odersky May 14, 2026
49af70c
Fixes #25856: Position not set crash in implicit search during import…
odersky May 14, 2026
a8fa0e8
Fixes #25943: Track super-calls as call edges in LambdaLift (#26029)
odersky May 14, 2026
91c4a55
Fixes #25801: Handle `TypeDefs` in `ensureHasSym` (#26011)
odersky May 14, 2026
55b60ad
Optimize handling of -Yexplain-cycles
odersky May 14, 2026
194d8a9
Simplify
odersky May 14, 2026
5dfd42c
Clarify ContextBase doc comment
odersky May 14, 2026
ed18d94
Optimize handling of -Yexplain-cycles (#26061)
odersky May 14, 2026
61b6d02
Add some more tests
starswap May 14, 2026
1f4a0a3
Function, Tuple, Product (12): fill in missing @param, @tparam, and @…
bvenners May 15, 2026
ade01ef
Bump Scala CLI to v1.14.0 (was v1.13.0) (#26065)
Gedochao May 15, 2026
faee244
Fixed broken URL links. (#26064)
cheeseng May 16, 2026
af08875
Stop using dollar signs in source in inline-trait-specialized-desugar
starswap May 16, 2026
80517e5
Preserve type info when lifting stable arguments (#26063)
nox213 May 16, 2026
f4dcfb0
Check info exists before pruning
starswap May 16, 2026
b1570f5
Add test for bug discovered in inlining
starswap May 16, 2026
f3cb5be
Add smaller version of tests/pos/specialized-trait-multiple-stages-sp…
starswap May 16, 2026
82240c9
Sharpen rules on inline vals and inline defs inside inline traits
starswap May 16, 2026
49ac34e
Fix inline-trait-y-equals-x-inlined-nowarn by special case in error r…
starswap May 16, 2026
fa0bb8b
Switch to using erasure for specialization and inline trait symbol re…
starswap May 16, 2026
2c2b6a0
Update comment
starswap May 16, 2026
0e1f17d
Fixes #25702: skip AnyClass over-match in Annotation.matches
claude May 17, 2026
ba22e07
Drop SharedCapability exception in subsumes
odersky May 17, 2026
0ce4c47
Fixes #25702: Avoid `AnyClass` fallback in `requiredClass` (#26010)
odersky May 17, 2026
00da885
feature: Improve the logical sources provider (#26079)
tgodzik May 18, 2026
69b774f
Scoverage: fix lifted type computation for parameterless methods (#26…
anatoliykmetyuk May 18, 2026
d3c96eb
Scoverage: refrain from lifting closures for capture calculus compati…
anatoliykmetyuk May 18, 2026
5ad714f
Scoverage: Exempt null coverage tests from Ycheck (#26075)
anatoliykmetyuk May 18, 2026
8bb386d
Tighten check of field classifiers
odersky May 18, 2026
50432af
Drop earlier check of fields with terminal capabilities
odersky May 18, 2026
be49502
More JVM backend cleanup (#25747)
SolalPirelli May 19, 2026
105d60b
Remove dead Android-related code from the JVM backend (#26092)
SolalPirelli May 19, 2026
0c45af9
Drop SharedCapability exception in subsumes (#26078)
odersky May 19, 2026
9e37de8
Drop stray comment
odersky May 19, 2026
9ae0d4a
Scoverage: Enable passing coverage tests (#26090)
anatoliykmetyuk May 19, 2026
a2085eb
Scoverage: Fix coverage parameterless select qualifier casts (#26087)
anatoliykmetyuk May 19, 2026
9d65a3f
Tighten check of field classifiers (#26085)
odersky May 19, 2026
f5e208b
Do not overwrite the supertype of non-trait super in Erasure (#26081)
SolalPirelli May 19, 2026
9553074
Update `scalajs-env-nodejs` to 1.6.0 (#26095)
SolalPirelli May 19, 2026
7441a44
Fix "Compiler crashes when illegal signature of `applyDynamic` is use…
lihaoyi May 19, 2026
af061e2
Fix synthesis of mirrors for GADT with dependent type parameters (#26…
eejbyfeldt May 19, 2026
c101b01
feat: Add actionable diagnostic for missing members (#23572)
ghostbuster91 May 19, 2026
5d6f9dd
Don't assume classes with self aliases to be pure.
odersky May 19, 2026
8748bb9
Fix stdlib
odersky May 19, 2026
fb8b10e
Don't assume classes with self aliases to be pure. (#26097)
odersky May 20, 2026
e9f67ff
Restore cmdTests and bootstrappedOnlyCmdTests execution in CI (#26082)
SolalPirelli May 20, 2026
e2242c4
Add regression test for i15050 (#26110)
eejbyfeldt May 20, 2026
cafed11
Fix expression evaluation in debugger under `-old-syntax` (#26096)
Swalkyn May 20, 2026
21ff5e8
Enable -Werror (#26111)
SolalPirelli May 20, 2026
12dce2f
improvement: Add -Wunused:all to presentation-compiler (#26113)
tgodzik May 20, 2026
1460be9
Fix broken `//> using jvm` directive in the bisect script (#26115)
Gedochao May 20, 2026
30e84c0
Fixes for the bisect script (#26116)
SolalPirelli May 20, 2026
33fb525
Fix extractions of release version tag
WojciechMazur May 21, 2026
d11c7c4
Set reference version to 3.8.4-RC3
WojciechMazur May 21, 2026
fce271e
[CI] Fix extractions of release version tag (#26135)
WojciechMazur May 21, 2026
a9d79ab
[chore] Set reference version to 3.8.4-RC3 (#26136)
WojciechMazur May 21, 2026
9397400
Use `\n` for missing methods patch (#26133)
SolalPirelli May 21, 2026
465cc1f
Add regession test for #18099 (#26138)
eejbyfeldt May 21, 2026
735b41e
Emit nested module classes as static inner classes (#26137)
SolalPirelli May 21, 2026
e1b3263
Skip mixed Scala-Java tests automatically on Scala.js (#26139)
SolalPirelli May 21, 2026
7db439f
Tolerate empty paths in JSPositions conversion (#26140)
SolalPirelli May 21, 2026
45ce541
Fix secondary constructor capture checking
odersky Apr 17, 2026
1759d1e
Fix classifier handling in capturesImpliedByFields
odersky Apr 17, 2026
45e2ec8
Handle multi forwards
odersky May 21, 2026
00b2011
Fix SAM conversion crash on @varargs trait method
nox213 May 22, 2026
5299183
fix comments
nox213 May 22, 2026
4e44c38
Fix crash on invalid opaque type in package (#26118)
SolalPirelli May 22, 2026
0d03148
[OpenCB Project Fix] Fixes #26015: Start of NoSpan in adaptToArgs fal…
soronpo May 23, 2026
b6e5747
Fix secondary constructor capture checking (#25841)
odersky May 23, 2026
cf3cc7a
Bump VirtusLab/scala-cli-setup from 1.13 to 1.14 (#26148)
dependabot[bot] May 24, 2026
bfa2b9e
Revise SafeRefs checking to make it work for inlined defs
odersky May 24, 2026
fdc149c
Streamline file extension handling
odersky May 24, 2026
25ad6b4
Specialized traits may not be extended by ordinary traits (they alway…
starswap May 25, 2026
6b7eed9
Fix object class bug manifesting across files
starswap May 25, 2026
a70eda5
Fix source file and spans for anonymous class instances
starswap May 25, 2026
b1b9f39
Support packages and objects containing specialized traits
starswap May 25, 2026
fd64930
Remove nasty gating and allow specializeInlineTraits to inline into B…
starswap May 25, 2026
b7cc899
Redo inline trait cycle check detection - catch previously missing ca…
starswap May 25, 2026
d2b0dee
Fix inline trait accesses parent val param
starswap May 25, 2026
db9a6a9
Do replaceInlineTraitSymbols by symbol lookup rather than manually ma…
starswap May 25, 2026
c593708
Fix erasure of class parents when these parents are specialized traits
starswap May 25, 2026
7903e82
Add tests for inlining a specialized instance across compilation units
starswap May 25, 2026
f6ac71a
Add explanatory comment
starswap May 25, 2026
b1faf9a
Add bridges for methods with specialized trait parameters; unlocks Ve…
starswap May 25, 2026
b0c46cc
Note a missing case
starswap May 25, 2026
80dfbdf
Do some docs updates
starswap May 25, 2026
edfa213
Merge branch 'main' into specialized-inline-traits
starswap May 25, 2026
e70887d
Merge remote-tracking branch 'scala3/main' into specialized-inline-tr…
starswap May 25, 2026
b99d58c
Move Specialized to own package to avoid conflict with specialized
starswap May 25, 2026
ee36dd0
Generic signature fixes (#25880)
SolalPirelli May 26, 2026
75c2a36
Fix inline-trait-self-type-problems to use inline traits
starswap May 26, 2026
2ec80bd
Support self types in specialized traits
starswap May 26, 2026
e9420de
Delete redundant old code
starswap May 26, 2026
f26cf2d
Add some specialized trait macro tests
starswap May 26, 2026
72efee1
Add opaque type tests for specialized traits
starswap May 26, 2026
0e0d683
Move GenericSignatures to JVM backend (#26158)
SolalPirelli May 26, 2026
44b4d74
Fix self type test error checking
starswap May 26, 2026
74d0e74
Fix caching issue with macros temporarily
starswap May 26, 2026
1489462
Streamline file extension handling (#26155)
odersky May 26, 2026
59a6d1b
Set developedVersion to 3.10.0
WojciechMazur May 26, 2026
4c5bcee
Set TASTy version to 28.10-exp-1
WojciechMazur May 26, 2026
1a421c4
Set default source version to 3.10
WojciechMazur May 26, 2026
c29daa1
Prepare source 3.11 settings and language imports
WojciechMazur May 26, 2026
41a7ed9
Add remind note about mima version
WojciechMazur May 26, 2026
29497c0
Fix language import description for separation checking (#26163)
odersky May 26, 2026
2d9fc64
[chore] Setup build for Scala 3.10.0 development cycle (#26164)
WojciechMazur May 26, 2026
eeaead7
Fix mismatch between `wrapArray` and `wrapArrayMethodName` (#26162)
mbovel May 27, 2026
3457bc3
deprecate `scala.annotation.strictfp` (#24839)
xuwei-k May 27, 2026
a34af67
Enable assertions for tests and fix other issues (#26168)
SolalPirelli May 27, 2026
04a7b27
Remove deprecated `-Youtput-only-tasty` (#26169)
SolalPirelli May 27, 2026
9e804a8
Remove no-op deprecated settings (#26171)
SolalPirelli May 27, 2026
77e6299
Scaladoc snippets: fix Show all lines & Scastie popup theme bugs (#26…
bracevac May 27, 2026
ced8228
No need to inline into specialized trait anonymous class instances; t…
starswap May 27, 2026
47f60d6
Fix missing mapping for explicilty mentioned type parameters in inlin…
starswap May 27, 2026
c97fe44
Preview SIP 68: Referenceable package objects (#24586)
odersky May 27, 2026
aa8c97c
Split some sbt build sources
alexarchambault May 1, 2026
1101077
fixup
alexarchambault May 7, 2026
7d0d3db
[build] Split some sbt build sources (#25994)
WojciechMazur May 28, 2026
fbc982c
Disallow polymorphic function types over impure function types (#26084)
odersky May 28, 2026
6b519ac
Bump benchmark version
starswap May 28, 2026
27ad62b
Fix rogue number
starswap May 28, 2026
af6b40a
Remove some old comments
starswap May 28, 2026
b8de83f
Move impl class erasure to erasure
starswap May 28, 2026
ff0e8f3
Switch to specType
starswap May 28, 2026
de2a0bb
Update comment
starswap May 28, 2026
a68af37
Support variance with Specialized traits
starswap May 28, 2026
7c29fdf
Fix inline trait symbol replacement
starswap May 28, 2026
552d1b4
Add two more tests
starswap May 28, 2026
bf0edf8
Update docs
starswap May 28, 2026
480a97e
Fix indirect ancestors bug for specialized trait anonymous class inst…
starswap May 28, 2026
9f1d21e
Fix typo and add todo to spec
starswap May 28, 2026
9eeb3bb
Add specialized trait super call tests
starswap May 28, 2026
1326205
Test named parameter passing
starswap May 28, 2026
7b0edea
Add gate test for Specialized inline methods on specialized traits
starswap May 28, 2026
a685040
Fix stable reference check for And types with type params (#25940)
HarrisL2 May 28, 2026
5f60b97
Switch to potential issue warning
starswap May 28, 2026
f4f34ae
Remove deprecated settings lifted to other categories (#26170)
SolalPirelli May 28, 2026
d403f31
Make stableNull public in the stdlib (#25886)
noti0na1 May 29, 2026
b059af6
Delete dead code in `io` (#26179)
SolalPirelli May 29, 2026
48d5341
drop: remove access to `Predef.any2stringadd` (#24656)
hamzaremmal May 29, 2026
c253163
chore: remove old support for `getClass` in `scala.AnyVal` (#24687)
hamzaremmal May 29, 2026
86f302e
Simplify `profile` package interface (#26175)
SolalPirelli May 29, 2026
0c3b953
Relax typer position assert in interactive mode (#26130)
SolalPirelli May 29, 2026
f305fee
Fix (#26178) private inline subclass access proxy bug (#26176)
starswap May 29, 2026
67a2098
Revise SafeRefs checking to make it work for inlined defs (#26154)
bishabosha May 29, 2026
77ef48c
Allow switching ordering of base classes in anonymous class instance
starswap May 29, 2026
6ea931c
Make into type and modifier stable
bishabosha May 29, 2026
fd28544
Add self inline example
starswap May 29, 2026
50f6832
Add vector zip example
starswap May 29, 2026
2716679
fix: Switch to specializedTypeArgs
starswap May 29, 2026
6653570
Fix specialized method inlining
starswap May 29, 2026
4dde32c
Merge branch 'main' into specialized-inline-traits
starswap May 29, 2026
1bd7a1e
Make into type and modifier stable (#26184)
bishabosha May 29, 2026
6679a49
Disallow dollars in names in safe mode
odersky May 29, 2026
db74ff5
Disallow dollars in names in safe mode (#25657)
odersky May 30, 2026
9eee09e
Fix SAM conversion crash on @VarArgs trait method (#26141)
odersky May 30, 2026
b9d3e0e
Test for #26186
odersky May 30, 2026
7010299
Copy erased flag into inline access proxies
starswap May 30, 2026
c26a453
Test for #26186 (#26189)
odersky May 31, 2026
175ebc7
Stop crashing on infinite inline
starswap May 31, 2026
e4bff7f
Also ban covariance with nothing
starswap May 31, 2026
14e2cb8
Fix #24653: Erase aliases of Unit as result type to void. (#26192)
sjrd May 31, 2026
1b67f5e
Test Java annotations on varargs element types (#26188)
mkurz Jun 1, 2026
52af999
Parse Java annotations on wildcard type arguments (#26187)
mkurz Jun 1, 2026
cc9bfae
Fix #26190: Copy erased flag into inline access proxies (#26191)
odersky Jun 1, 2026
05c79db
Fixes to `into` doc (#26203)
SolalPirelli Jun 1, 2026
a932913
make unroll a preview feature (#24903)
bishabosha Jun 1, 2026
fba65a8
Fix typos in preview overview doc (#26204)
SolalPirelli Jun 1, 2026
4a3acda
Regression test for #25723 (#26205)
SolalPirelli Jun 1, 2026
69f4f44
Fix nothing test
starswap Jun 1, 2026
cbc4d63
Fix variant warning test
starswap Jun 1, 2026
595a453
Fix nowarn error numbering in message
starswap Jun 1, 2026
71f7aa8
Fix typo
starswap Jun 1, 2026
bafc48c
Add specialized trait masked inline specialization via inlining
starswap Jun 1, 2026
fdd2183
Add todo comment
starswap Jun 1, 2026
cf28d7b
Support sealed specialized traits
starswap Jun 1, 2026
8468ad1
Erase also "raw" specialized trait implementation classes (fully spec…
starswap Jun 1, 2026
8134227
Add zip example
starswap Jun 1, 2026
8e1ce6c
Update docs
starswap Jun 1, 2026
98ee33d
Merge branch 'main' into specialized-inline-traits
starswap Jun 1, 2026
95a761d
Update directives
starswap Jun 1, 2026
1e6deeb
Add more tests
starswap Jun 2, 2026
97d7f2b
Update variance docs
starswap Jun 2, 2026
baae788
Fix varargs case
starswap Jun 2, 2026
f84c196
Test variance better and fix
starswap Jun 2, 2026
3ccbf71
Update comments
starswap Jun 2, 2026
c5b5ac7
Fix typo
starswap Jun 2, 2026
d728c40
Fix test incorrect reference
starswap Jun 2, 2026
b9385db
Fix synthesisation to match all cases
starswap Jun 2, 2026
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "\U0001F41B Bug report"
about: Report a bug about the Dotty Compiler
about: Report a bug about the Scala 3 compiler
title: ''
labels: itype:bug, stat:needs triage
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/crash.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "\U0001F4A5 Crash report"
about: Report a Dotty compiler crash
about: Report a Scala 3 compiler crash
title: ''
labels: itype:bug, itype:crash, stat:needs triage
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ assignees: ''

---

Please create a feature request in the [Dotty Discussions](https://github.com/scala/scala3/discussions/new?category=feature-requests).
Please create a feature request in the [Scala 3 Discussions](https://github.com/scala/scala3/discussions/new?category=feature-requests).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/other-issue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Other issue
about: Report an issue about the Dotty Compiler (not bug or crash)
about: Report an issue about the Scala 3 compiler (not a bug or a crash)
title: ''
labels: stat:needs triage
assignees: ''
Expand Down
47 changes: 14 additions & 33 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,23 @@
<!-- Fixes #XYZ (where XYZ is the issue number from the issue tracker) -->
Fixes #XYZ

<!-- TODO description of the change -->
<!-- Ideally should have a title like "Fix #XYZ: Short fix description" -->

<!--
TODO first sign the CLA
https://contribute.akka.io/cla/scala
-->

<!-- if the PR is still a WIP, create it as a draft PR (or convert it into one) -->
<!-- where #XYZ is the issue number; create as draft if this is still a WIP;
if in doubt about your contribution, refer to: https://github.com/scala/scala3/blob/main/CONTRIBUTING.md
don't forget to sign the CLA: https://contribute.akka.io/cla/scala -->

## How much have you relied on LLM-based tools in this contribution?

<!--
State clearly in the pull request description,
whether LLM-based tools were used and to what extent

(extensively/moderately/minimally/not at all)
-->
<!-- Pick one; refer to https://github.com/scala/scala3/blob/main/LLM_POLICY.md for details -->

<!--
Refer to our [LLM usage policy](https://github.com/scala/scala3/blob/main/LLM_POLICY.md) for rules and guidelines
regarding usage of LLM-based tools in contributions.
-->
Extensively, for ...
Moderately, for ...
Minimally, for ...
Not at all

## How was the solution tested?

<!--
If automated tests are included, mention it.
If they are not, explain why and how the solution was tested.
-->

## Additional notes

<!-- Placeholder for any extra context regarding this contribution. -->
<!-- Pick one; exceptions must have a very good reason -->

<!--
When in doubt, and for support regarding contributions to a particular component of the compiler,
refer to [our contribution guide](https://github.com/scala/scala3/blob/main/CONTRIBUTING.md),
and feel free to tag the maintainers listed there for the area(s) you are modifying.
-->
New automated tests (including the issue's reproducer, if applicable)
Covered by existing tests (this is a refactoring)
Non-code change, no tests needed
Manual tests because writing automated tests is impractical, described below (in detail)
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dotty
name: Scala 3

on:
push:
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

# Extract the release tag
- name: Extract the release tag
run : echo "RELEASE_TAG='${GITHUB_REF#*refs/tags/}'" >> $GITHUB_ENV
run : echo "RELEASE_TAG=${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV

- name: Check compiler version
shell: bash
Expand Down Expand Up @@ -276,5 +276,5 @@ jobs:
with:
fetch-depth: 0
- uses: coursier/cache-action@v8
- uses: VirtusLab/scala-cli-setup@v1.12.5
- uses: VirtusLab/scala-cli-setup@v1.14
- run: scala-cli format --check
2 changes: 1 addition & 1 deletion .github/workflows/lts-backport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
fetch-depth: 0
- uses: coursier/cache-action@v8
- uses: VirtusLab/scala-cli-setup@v1.12.3
- uses: VirtusLab/scala-cli-setup@v1.14
- run: scala-cli ./project/scripts/addToBackportingProject.scala -- ${{ github.sha }}
env:
GRAPHQL_API_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scaladoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v6

- uses: coursier/cache-action@v8
- uses: VirtusLab/scala-cli-setup@v1.12.3
- uses: VirtusLab/scala-cli-setup@v1.14

- name: Validate docs sidebars
run: scala-cli ./project/scripts/checkSidebarDocs.scala
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: coursier/cache-action@v8
- uses: VirtusLab/scala-cli-setup@v1.11
- uses: VirtusLab/scala-cli-setup@v1.14
with:
jvm: temurin:17
apps: sbt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
env:
USER_FOR_TEST: ${{ secrets.SPEC_DEPLOY_USER }}
if: ${{ env.USER_FOR_TEST != '' }}
uses: burnett01/rsync-deployments@8.0.4
uses: burnett01/rsync-deployments@8.0.5
with:
switches: -rzv
path: docs/_spec/_site/
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/stdlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,17 @@ jobs:
distribution: 'temurin'
java-version: 17
cache: 'sbt'

- uses: sbt/setup-sbt@v1

- name: Test `scala3-compiler-nonbootstrapped`
run: ./project/scripts/sbt scala3-compiler-nonbootstrapped/test

- name: Cmd Tests
run: |
./project/scripts/sbt scala3-nonbootstrapped/publishLocal
./project/scripts/cmdTests

test-scala3-compiler-bootstrapped:
runs-on: ubuntu-latest
steps:
Expand All @@ -183,10 +190,17 @@ jobs:
distribution: 'temurin'
java-version: 17
cache: 'sbt'

- uses: sbt/setup-sbt@v1

- name: Test `scala3-compiler-bootstrapped`
run: ./project/scripts/sbt scala3-compiler-bootstrapped/test

- name: Cmd Tests
run: |
./project/scripts/sbt scala3-bootstrapped/publishLocal
./project/scripts/bootstrappedOnlyCmdTests

test-scala3-bootstrapped-compilation-coverage:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ testlogs/

before-pickling.txt
after-pickling.txt
after-printing.txt
bench/compile.txt

community-build/scala3-bootstrapped.version
Expand Down Expand Up @@ -104,4 +105,4 @@ docs/_spec/.jekyll-metadata
scaladoc/output/

# only used in local development
.enable_bsp_all_projects
.enable_bsp_all_projects
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ Scala 3
[![Join the chat at https://discord.com/invite/scala](https://img.shields.io/discord/632150470000902164)](https://discord.com/invite/scala)

This is the home of the [Scala 3](https://www.scala-lang.org) standard library, compiler, and language spec.

* [Documentation](https://docs.scala-lang.org/scala3/)

Try it out
==========
To try it in your project see also the [Getting Started User Guide](https://docs.scala-lang.org/scala3/getting-started.html).
More documentation [here](https://docs.scala-lang.org/scala3/).

Building a Local Distribution
=============================
Expand All @@ -18,16 +13,16 @@ Building a Local Distribution

Code of Conduct
===============
Dotty uses the [Scala Code of Conduct](https://www.scala-lang.org/conduct.html)
Scala 3 uses the [Scala Code of Conduct](https://www.scala-lang.org/conduct.html)
for all communication and discussion. This includes both GitHub, Discord and
other more direct lines of communication such as email.

How to Contribute
=================
* [Getting Started as Contributor](https://docs.scala-lang.org/scala3/guides/contribution/contribution-intro.html)
* [Issues](https://github.com/scala/scala3/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
* [Policy regarding usage of LLM-based tools in contributions to the Scala project](LLM_POLICY.md)
* [Contributing guide](./CONTRIBUTING.md)
* [Issues where help is wanted](https://github.com/scala/scala3/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
* [Policy regarding the use of LLM-based tools](LLM_POLICY.md)

License
=======
Scala 3 is licensed under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
Scala 3 is licensed under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Run with: scala-cli --power --jmh bench-micro/src/main/scala/dotty/tools/benchmarks/SpecializedTraitsBenchmark.scala
// May have to run it again / delete .scala-build and rerun if you get a class not found
// error from scala-cli first time - the --jmh flag is still experimental.
// Don't forget to publish the compiler first and check that the version below corresponds to the generated version,
// as well as to kill the bloop server if you are republishing the same version as before.
// scala-cli --power bloop exit

//> using scala 3.9.0-RC1-bin-SNAPSHOT-nonbootstrapped
//> using options -language:experimental.specializedTraits

package dotty.tools.benchmarks

import org.openjdk.jmh.annotations.*
import java.util.concurrent.TimeUnit

class VecManual(elems: Array[Int]):
private val num = summon[Numeric[Int]]

def length = elems.length

def apply(i: Int): Int = elems(i)

def scalarProduct(other: VecManual): Int =
require(this.length == other.length)
var result = num.fromInt(0)
for i <- 0 until length do
result = num.plus(result, num.times(this(i), other(i)))
result

class VecGeneric[T: Numeric](elems: Array[T]):
private val num = summon[Numeric[T]]

def length = elems.length

def apply(i: Int): T = elems(i)

def scalarProduct(other: VecGeneric[T]): T =
require(this.length == other.length)
var result = num.fromInt(0)
for i <- 0 until length do
result = num.plus(result, num.times(this(i), other(i)))
result

inline trait VecSpecialized[T: {Specialized, Numeric2}](elems: Array[T]):
private val num = summon[Numeric2[T]]

def length = elems.length

def apply(i: Int): T = elems(i)

def scalarProduct(other: VecSpecialized[T]): T =
require(this.length == other.length)
var result = num.fromInt(0)
for i <- 0 until length do
result = num.plus(result, num.times(this(i), other(i)))
result

@State(Scope.Benchmark)
class Arrays:
var arr1 = Array.fill(100_000_000) {math.round(math.random().floatValue * 4)}
var arr2 = Array.fill(100_000_000) {math.round(math.random().floatValue * 4)}
val target = arr1.zip(arr2).map((x, y) => x * y).fold(0)(_ + _)

@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.AverageTime))
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Warmup(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 15, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Fork(1)
class VecBench:
@Benchmark
def manual(arr: Arrays) =
val x = VecManual(arr.arr1)
val y = VecManual(arr.arr2)
assert(x.scalarProduct(y) == arr.target)

@Benchmark
def generic(arr: Arrays) =
val x = VecGeneric[Int](arr.arr1)
val y = VecGeneric[Int](arr.arr2)
assert(x.scalarProduct(y) == arr.target)

@Benchmark
def specialized(arr: Arrays) =
val x = new VecSpecialized[Int](arr.arr1) {}
val y = new VecSpecialized[Int](arr.arr2) {}
assert(x.scalarProduct(y) == arr.target)

// You can really see the impact of Specialized on the interface usage here
// Remove Specialized and see that the generated code gets much more boxing and unboxing
// which slows it down substantially.
inline trait Numeric2[T: Specialized]:
def fromInt(x: Int): T
def plus(x: T, y: T): T
def times(x: T, y: T): T

implicit object IntIsIntegral extends Numeric2[Int]:
override def fromInt(x: Int): Int = x
override def plus(x: Int, y: Int): Int = x + y
override def times(x: Int, y: Int): Int = x * y
2 changes: 1 addition & 1 deletion community-build/community-projects/cats-effect-3
Submodule cats-effect-3 updated 565 files
16 changes: 12 additions & 4 deletions community-build/src/scala/dotty/communitybuild/projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@ final case class SbtCommunityProject(
val sbtProps = Option(System.getProperty("sbt.ivy.home")) match
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
case _ => Nil
extraSbtArgs ++ sbtProps ++ List("-sbt-version", "1.11.5", "-Dsbt.supershell=false", s"--addPluginSbtFile=$sbtPluginFilePath")
extraSbtArgs ++ sbtProps ++ List("-sbt-version", "1.12.1", "-Dsbt.supershell=false", s"--addPluginSbtFile=$sbtPluginFilePath")

object SbtCommunityProject:
def scalacOptions = List(
"-Xcheck-macros",
"-Wsafe-init",
"-Yexplicit-nulls",
"-language:unsafeNulls",
)

object projects:
Expand All @@ -134,7 +136,7 @@ object projects:

private def removeRelease8(projects: String*): String =
projects.map(project =>
s"""set $project/Compile/scalacOptions := ($project/Compile/scalacOptions).value.filterNot(opt => opt == "-release" || opt == "8")"""
s"""set $project/Compile/scalacOptions := ($project/Compile/scalacOptions).value.filterNot(opt => opt == "-release" || opt == "-java-output-version" || opt == "8")"""
).mkString("; ")

private def aggregateDoc(in: String)(projects: String*) =
Expand Down Expand Up @@ -426,7 +428,14 @@ object projects:

lazy val catsEffect3 = SbtCommunityProject(
project = "cats-effect-3",
sbtTestCommand = "ciJVM",
sbtTestCommand =
List(
removeRelease8("core.jvm", "example.jvm", "kernel.jvm", "kernelTestkit.jvm", "laws.jvm", "std.jvm", "testkit.jvm", "tests.jvm", "rootJVM", "ioAppTestsJVM", "benchmarks", "graalVMExample"),
// repeats code from `removeRelease8`, but oh well, maybe generalize later
"""set root/ScalaUnidoc/unidoc/scalacOptions := (root/ScalaUnidoc/unidoc/scalacOptions).value.filterNot(opt => opt == "-release" || opt == "-java-output-version" || opt == "8")""",
"set ThisBuild / tlFatalWarnings := false",
"ciJVM"
).mkString("; "),
sbtPublishCommand = "publishLocal",
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
)
Expand Down Expand Up @@ -762,7 +771,6 @@ def allProjects = List(
projects.libretto,
projects.jacksonModuleScala,
projects.specs2,
projects.coop,
projects.spire,
projects.http4s,
projects.parboiled2,
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/MainGenericCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,6 @@ object MainGenericCompiler {
properArgs
++ List("-script", settings.targetScript)
++ settings.scriptArgs
scripting.Main.main(properArgs.toArray)
scripting.Main.main(fullArgs.toArray)
end main
}
Loading