github scala/scala3 3.10.0-RC1

pre-release3 hours ago

Breaking changes

  • Don't infer implicits from non-accessible companion #25367
  • Enhance constant-folding during inlining #25731
  • Replace catching StackOverflowError with fuel #25937
  • Forbid this in top-level definitions #26448
  • Replace runtime.Rich* implicits on primitives by direct extension methods. #23872
  • Make -> sugar an inline method #24728
  • Make with type operator an error #26545
  • For bytecode generation, use stock ASM (not our old scala-asm fork) #26772

Highlights of the release

  • Add support for \s space escape #26515
  • Add support for //> using dep directives 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 -language feature flags #26424
  • New preview features:
    • SIP 61: Unroll default arguments for binary compatibliy is now in preview #24903
    • SIP 75: Relaxed lambda syntax is now in preview #26728
    • SIP 68: Referenceable package objects is now preview #24586
  • New experimental features:
    • Pre-SIP: Inline Traits & Specialized Traits #26156
    • Pre-SIP: Modular AGentic Interface Code: Spec strings #26486

Other changes and fixes

Annotations

  • Add regression test for Java annotation @retention visibility (#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

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

  • Fixes #26340: Break cross-unit cyclic export across recompiled source siblings #26341

Inline

  • Fix fuel-related OpenCB issues #26898
  • Fix summonInline deferred 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.ChainingOps methods inline #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 getClass in scala.AnyVal #24687
  • Chore: StringContext methods 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.format from the standard library. #26568
  • Fix Boolean scaladoc 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:src to 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 Null a subclass of AnyVal under -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 with type operator an error #26545
  • Dedented string literals alternative implementation #26332
  • Support \s space 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 //> using directives 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 App to an explicit main #26370

SBT Bridge

  • Fix pattern-match undercompilation when a case class or extractor changes #26262

Scala-JS

  • Fixes #25792: String.split(Char) stops delegating to Regex #26036

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 synchronized methods 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 @VarArgs trait 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 appliedToTypeTrees to 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.Pure bounds to the ClassTagSeqFactory family #26224
  • Several fixes around fresh and Unscoped. #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 -language feature 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 Context for 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 SourceFile more #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

Don't miss a new scala3 release

NewReleases is sending notifications on new releases.