3.10.0-RC1
Pre-release
Pre-release
·
71 commits
to main
since this release
Breaking changes
- Don't infer implicits from non-accessible companion #25367
- Enhance constant-folding during inlining #25731
- Replace catching StackOverflowError with fuel #25937
- Forbid
thisin top-level definitions #26448 - Replace runtime.Rich* implicits on primitives by direct extension methods. #23872
- Make
->sugar an inline method #24728 - Make
withtype operator an error #26545 - For bytecode generation, use stock ASM (not our old scala-asm fork) #26772
Highlights of the release
- Add support for
\sspace escape #26515 - Add support for
//> using depdirectives in the REPL (along with trailing code) #26507 - Add .deb and .rpm packaging #26858
- New stablized features:
- SIP 71: strictEqualityPatternMatching is now enabled by default default & add deprecation mechanics for
-languagefeature flags #26424
- SIP 71: strictEqualityPatternMatching is now enabled by default default & add deprecation mechanics for
- New preview features:
- New experimental features:
Other changes and fixes
Annotations
- Add regression test for Java annotation
@Retentionvisibility (#389) #26339 - Synthetic cast must not break tailrec #26343
- Deprecate
scala.annotation.strictfp#24839
Backend
- More accurate generic signatures for boxed primitives #25944
- Do not emit unnecessary fields for nested objects #25538
- For bytecode generation, use stock ASM (not our old scala-asm fork) #25989
- Layer JVM backend without cycles #26237
Desugaring
- Use updated params when desugaring macro context bounds #26206
Scaladoc
- Scaladoc: find members ending in
!or$#26739 - Scaladoc: Do not crash on class+module in API package #26766
- Scaladoc: Do not allow resolving warnings to hide each other #26742
- Scaladoc: Recursively unwrap exported trees #26737
- Scaladoc: Stop hijacking link clicks #26664
- Scaladoc: stay on the same page when switching versions #26762
- Disable bogus Scaladoc warnings #26663
Documentation
- Drop: remove access to
Predef.any2stringadd#24656 - Fixes to
intodoc #26203 - Fix markdown code fences in PartialFunction.scala #26397
- Util, io, ref (8): filled in
@param,@tparam, and@returntags that were missed last time #26127 - Jdk (7): filled in
@param,@tparam, and@returntags that were missed last time #26126 - Root files (9): filled in
@param,@tparam, and@returntags that were missed last time #26125 - Collection immutable (3): filled in
@param,@tparam, and@returntags that were missed last time #26121 - Collection mutable (2): filled in
@param,@tparam, and@returntags that were missed last time #26120 - Quoted, compiletime (6): filled in
@param,@tparam, and@returntags that were missed last time #26124 - Annotation, reflect, misc (11): fill in missing
@param,@tparam, and@returntags in Scaladoc comments #25381 - Sys, concurrent, runtime (1): filled in
@param,@tparam, and@returntags that were missed last time #26119 - Collection core (4): filled in
@param,@tparam, and@returntags that were missed last time #26122 - Math (5): filled in
@param,@tparam, and@returntags that were missed last time #26123 - Fix scaladoc link check for into #26207
Extension Methods
- Fix: prevent infinite recursion in compareAppliedTypeParamRef #26608
- Fix regression: more frequently cast the result of transparent inline #26684
Implicits
- Also map types in Implicits.emitDictionary #26143
Incremental Compilation
Inline
- Fix fuel-related OpenCB issues #26898
- Fix
summonInlinedeferred inline selection #26002 - Fix "Since 3.8.0-RC1, inline match with inlined values sometimes does not compile as it erases values that it accesses" #24935
- Copy erased flag into inline access proxies #26191
- Fix (#26178) private inline subclass access proxy bug #26176
- Speed up inlining #26823
Java Interop
- Add support for java records in pattern matching #26497
- Feat: support Java 25 main class discovery #26642
JDK
- Replace synchronized(this) with lock-free initState in LazyList #26100
- Parse classfile generic parameters defined in supertype generic signature #26317
- Handle missing Java inner class dependencies in classfile parser #26673
Standard Library
- Make
scala.util.ChainingOpsmethodsinline#24725 - Add an implementation of IsSeq for IArray. #24552
- Add an implementation of BuildFrom for IArray #24674
- Add CanEqual instance for NamedTuple #24890
- Add string singleton comparison operators to scala.compiletime.ops.string. #24748
- Chore: remove old support for
getClassinscala.AnyVal#24687 - Chore:
StringContextmethods are not Scala 2 macros anymore #24407 - Replace runtime.Rich* implicits on primitives by direct extension methods. #23872
- Add implicit conversion from IArray.type to Factory #24675
- Remove all uses of
String.formatfrom the standard library. #26568 - Fix
Booleanscaladoc to match other primitives re: extensions #26659 - Fix Enumeration.ValueSet.iteratorFrom for negative IDs #26672
- Fix: LongMap.put returning None for existing Long.MinValue key #26274
- Perf: fix redundant rootNode.diff computation in HashSet.diff #26275
- Perf: eliminate redundant getHash calls in HashMap/HashSet concat #26278
- Perf: skip builder allocation for empty source in HashMap.from #26280
- Perf: eliminate local object allocation in RedBlackTree.partitionEntries #26285
- Perf: ArrayDeque.clear() from O(n) to O(1) with GC-safe nulling #26288
- Perf: use bound variable in ArrayOps.WithFilter.flatMap #26294
Linting
- Fix "Spurious shadowing warning with -Wshadow:type-parameter-shadow" #26566
- Fix false unused for renamed extension method #26441
- Add warning for use of interpolator from Any #26305
- Update
-Wconf:srcto match Scala 2 behavior #24772
Match Types
- Fixes #26683: Do not answer IsConst for a stuck match type #26685
- fix: #25843 Don't add capture sets to MatchCase type encodings #26306
Quotes
- Recover call skolems in avoid instead of typing inline proxies as skolem #26872
- fix: #25245 Ensure remapping of class member infos referencing spliced types #26307
- Check macro expansion type #25756
- Macro interpreter: rethrow RecursionOverflow #26896
Nullability
- Make stableNull public in the stdlib #25886
- Make
Nulla subclass ofAnyValunder-Yexplicit-nulls. #25393 - Safe universal methods under -Yexplicit-nulls. #26771
Parser
- Fix #26564: warn on dubious negative Long/Float/Double literal syntax #26725
- Parser: Recover from unclosed string literal errors #26763
- Fix outline compilation with string interpolation #26636
- Make
withtype operator an error #26545 - Dedented string literals alternative implementation #26332
- Support
\sspace escape also in interpolations #26845
Pattern Matching
- Fix false exhaustivity warning on invariant type constructors #26430
- Simplify unapply result types to handle match types #26631
- Check inhabitedness of counter-examples in satisfiable #26356
- Preserve refinement types in SpaceEngine's erase #26403
- Ignore classifiers when casting in a pattern match #26526
- Extend checkSensical test to scrutinees of derived value classes #26421
- Handle generic tuple in getMatch branch #26157
Pickling
- Fixes #25947, #11043: Avoid JavaArrayType in synthesized classOf for structural calls #26028
- Stop emitting SourceFile annotation #26437
Presentation Compiler
- Fix build break due to conflicting PRs #26495
- Improvement: fallback PC symbol location position to a classfile if no source exists #26454
- Fix PcInlayHints crash on inlined trees from external dependencies #26385
- Bugfix: Don't show errors from other files #26346
- Chore: Add batch semanticdb for Metals 2 #26323
REPL
- Feat: add -Yrepl-print-tostring to render REPL results via toString #26435
- Feat(repl): support the toolkit directive and :toolkit command #26788
- Retain loading diagnostics across REPL completions #26818
- Fix(repl): restore SourceFile.maybeIncomplete #26811
- Drop REPL parse warnings on parse error #26798
- Feat(repl): support the jar directive #26726
- Feat(repl): support dependency directive aliases #26722
- Refactor(repl): command registry #26716
- Refactor(repl): using directive handling #26708
- REPL: refactor parsing commands + trailing code + extra test coverage #26602
- Fix: REPL crash on :dep after compiler queries #26599
- REPL: apply settings changes to trailing code #26596
- Prevent mixing of
:commands and//> usingdirectives in a single REPL input & raise directives parser diagnostics #26592 - Fix: rollback REPL state after compilation error #26536
- Allow for directives in the REPL to be preceded/interjected by comments or empty lines #26511
- Add :replay command to the REPL #26506
- Add deprecated :paste command to the REPL #26496
- Feat: add :save command to the REPL #26493
- Feat: -deprecation and -feature by default in the REPL #26484
- Fix: make REPL completion interruptible #26443
Reporting
- More helpful implicit not found message for
ClassTag[T]#26715 - Scaladoc: do not warn on unused scalacOptions by default #26717
- Print right-associative operators as selections #26452
- Expose inline call-site chain as structured DiagnosticRelatedInformation #26338
- Better transparent inline errors (add note about transparent inline limitation) #26335
- Fix: emit -Winfer-union warning in the REPL #26537
- Do not eagerly compute potential migration diagnostic messages #26687
Rewrites
- Add -Yapp-to-main rewrite converting
object extends Appto an explicit main #26370
SBT Bridge
- Fix pattern-match undercompilation when a case class or extractor changes #26262
Scala-JS
SemanticDB
- Bugfix: Fix the issue and no longer show <?> which is invalid #26607
- Move test-only SemanticDB code to test sources #26482
- Emit definition occurrence for primary constructor parameters in SemanticDB #26410
- Semanticdb: emit occurrence for generated main entry points #26354
Transform
- Emit
synchronizedmethods explicitly on the JVM #26697 - Restrict private access assert to nonsynthetic pos #26760
- Fixes #26352: Reconstruct a nested module's outer accessor for inlined references in downstream units #26353
- Fix SAM conversion crash on
@VarArgstrait method #26141
Tuples
- Make
->sugar an inline method #24728 - Add support for member selection on generic tuples with abstract type bounds #26494
Typer
- Prohibit Unsafe Wildcard Match-type Applications #25885
- Allow
appliedToTypeTreesto operate on block expressions #26259 - Fixes #24936: "missing outer accessor" crash for static module reached via trait self type #26355
- Fixes #24414: Fix StaleSymbolException in Namer.addChild after compilation suspension #26019
- Do not create forwarders when an error has already occurred #26220
- Fix stable reference check for And types with type params #25940
- One more fuel check #26897
Experimental: Capture Checking
- Fix capture checker crash when mapping a Var capture set #26667
- Fixes #26556: Handle flexible types in cc #26709
- Do Not Map Capture Variables in GlobalCapToLocal #26581
- Prohibit capset applications with postfix hat #26583
- Be more selective in localCapToGlobal #26453
- Tests for #26416 #26423
- Disallow polymorphic function types over impure function types #26084
- Changes to usage leak detection and reporting #26253
- Add missing
& caps.Purebounds to the ClassTagSeqFactory family #26224 - Several fixes around
freshandUnscoped. #26193 - Keep parameter names of closures under cc #26315
- CC: Implement Classifier Exclusion Pt. 1 & 2 #26383
- Add MutableIdentitySet to optimize variable dependencies in CC #26720
- Some small fix in CC #26705
- Fix empty capture set handling in CC Setup #26519
- Better handling of nested capture sets #26547
- Drop reach capabilities #26246
Coverage
- Fix coverage capture for lifted constructor args #26571
- Fix coverage lifting of skolem-prefixed types #26613
- Scoverage: instrument chained calls correctly #26166
- Fix coverage lifting across unsafeDiscardUses #26601
Experimental: Erased definitions
Experimental: Match Subcases
- Improve exhaustivity/reachability checking for sub-cases #25694
Experimental: Separation Checking
- Handle method application in separation checker #26419
- Fixes for pattern matching under separation checking #26580
Experimental: Strict Equality
- Enable strictEqualityPatternMatching (SIP-67) by default & add deprecation mechanics for
-languagefeature flags #26424 - Fix experimental flags for SIP-67 to be enabled at Scala 3.10 #26428
Experimental: Unroll
- Make unroll a preview feature #24903
JVM Backend Optimizer
- Use the optimizer on the bootstrapped compiler #26373
- Stop capturing a
Contextfor optimizer warnings #26236 - Optimizer misc improvements #26704
- Only run trait specialization passes when compilation units contain inline traits #26842
Named Tuples
- Optimise NamedTuple.toSeqMap #25318
- Make namedTupleCanEqual stable #26243
- Fix NamedTuple scaladoc #26319
- Fix named-tuple pattern resolution under -Yexplicit-nulls #26233
Package Manager
- Add deb and rpm packaging #26858
Settings
- Remove deprecated settings lifted to other categories #26170
- Remove no-op deprecated settings #26171
- Remove deprecated
-Youtput-only-tasty#26169 - Add back and deprecate already stabilised/in-preview language feature flags #26425
- Move relaxedLambdaSyntax from experimental to preview #26728
Specification
- Preview SIP 68: Referenceable package objects #24586
Testing
- Add DeterminismTest checking classfile/TASTy stability under recompilation #26553
Infrastructure
- Use the stdlib more instead of defining methods in
dotc.util#24724 - Simplify classpath handling #26313
- Centralize JAR handling #26331
- Encapsulate and simplify IO package further #26485
- Simplify
SourceFile, remove undocumented support for shebang #26444 - Simplify classfile reading #26481
- Improve IO package encapsulation #26398
- Encapsulate source paths more #26795
- LogicalPackagesProvider: use the compilation Context #26776
- Fix paths of binary dependencies on module objects #26761
- Remove
NoAbstractFile#26706 - Remove misleading
Symbol.isPrivate#26640 - Delete dead code #26227
- Fix some typos #26230
- Remove some unneeded null checks and
uncheckedNNs #26225 - Tolerate lack of source file for relative paths #26900
- Fix typos across the codebase #26334
- Encapsulate
SourceFilemore #26718 - Delete dead code in
io#26179
Experimetnal: Safe Mode
- Revise SafeRefs checking to make it work for inlined defs #26154
- Disallow dollars in names in safe mode #25657
Contributors
Thank you to all the contributors who made this release possible 🎉
According to git shortlog -sn --no-merges 3.9.0..3.10.0-RC1 these are:
135 Solal Pirelli
74 Martin Odersky
29 Piotr Chabelski
26 Oliver Bračevac
22 Jakub Warchoł
22 Jamie Thompson
19 Wojciech Mazur
16 Patryk Zieliński
14 Anatolii Kmetiuk
14 Rikito Taniguchi
13 Bill Venners
11 Sébastien Doeraene
10 Som Snytt
8 He-Pin(kerr)
8 dependabot[bot]
7 Matt Bovel
6 Oron Port
5 Bartłomiej Kozak
5 Claude
5 HarrisL2
5 Jan Chyb
5 Jozef Koval
5 Lukas Rytz
5 Tomasz Godzik
5 Yichen Xu
5 noti0na1
4 Jeon Yoonjae
4 Puerco
2 Alex Archambault
2 Dmytro Mitin
2 Emil Ejbyfeldt
2 GitHub Copilot
2 Hamish Starling
2 Hamza Remmal
2 Matthias Kurz
2 Seth Tisue
2 Yoonjae Jeon
1 Arnout Engelen
1 Darwin Morris
1 Guillaume Martres
1 Hamish
1 Jack Koenig
1 Jason Zaugg
1 Katarzyna Marek
1 Kenji Yoshida
1 Li Haoyi
1 Mathias
1 Mikołaj Fornal
1 Piotr Paradziński
1 Rok Kralj
1 Stas Shevchenko
1 Tom Riddle
1 Walter Tetzner
1 Zieliński Patryk
1 eugene yokota
1 rochala