github scala/scala3 3.8.0-RC1

pre-release19 hours ago

Highlights of the release

  • Require JDK 17+ #24146
  • Scala Standard Library is now compiled and published using Scala 3
  • Add explicit null checks to Scala 3 Standard Library #23566
  • Add capture-checking to Scala 3 Standard Library #23688
  • Add capture-checking to Scala 2 collections #23769
  • Extract REPL to be its own artifact #24243
  • SIP-57: Make runtimeChecked a standard feature #23262
  • SIP-62: Make better-fors a stable feature #23630
  • Preview SIP-71: Make into preview feature #24090
  • Experimental SIP-67: Strict equality pattern matching #23803
  • Experimental SIP-70: Allow multiple spreads in function arguments #23855
  • Experimental SIP-75: Allow single-line lambdas after : #23821
  • Experimental: Match if sub cases #23786

See the release thread on contributors.scala-lang.org for additional comments

Other changes and fixes

Annotations

  • Emit deprecation warnings when a symbol is annotated by a deprecated annotation #23906
  • Deprecate scala.annotation.elidable #23913
  • Deprecate scala.annotation.transparentTrait #23116

Experimental: Capture Checking

  • Move scala.caps.Pure to caps and make it non-experimental #23745
  • Make scala.caps.Pure transparent #23914
  • Make scala.caps.Capability non-experimental #23507
  • Check conformance to scala.caps.Pure upper bound only under cc #23784
  • Widen type parameters before box adaptation #23809
  • Level checking: distinguish between certain capset vars with same owner #24077
  • Implement FreshCap Handling for Classes and Objects #24136
  • Skip capture sets in checkNoPrivateLeaks and drop them in posttyper when cc is not enabled #23886
  • Changes around reaches and uses #23584
  • Revise capability hierarchy and fix classifiers #23656
  • Improve closure typing #23700
  • Better printing of capabilities in error messages #23701
  • More improvements to error messages #23721
  • CC Language Ref Polishings #23762
  • CC Language Reference Improvements v2 #23818
  • Changes in CC around classes, constructors, this #23874
  • Various fixes and simplifications #23881
  • Simplify Level Checking and Fix Errors #23934
  • Introduce precise refined types #24154
  • Fix unsoundness in APPLY and SELECT rules #24159
  • Fixes for mutability #24205
  • Implement inheritance condition for Mutable types #24253
  • Don't add cap when creating instances of capability classes. #24256
  • Changes to Fresh and Separation Checking #24112

Experimental: Explicit Nulls

  • Only nullify tasty if Yflexify-tasty is set; Refine FlexibleType nullification rules #23938
  • Apply flexible types to files compiled without explicit nulls #23386
  • Fix NotNullInfo in multi-case match #23864
  • Fix captureWildcards with FlexibleType #24070
  • Do not assume left is non-null if another branch is null in splitLast #24325

Experimental: Global Initalization

  • Modelling assigning to null in the global object initialization checker #23858
  • Fix global init checker unexpected by name #23859
  • Fix selection on safe value in the global object initialization checker #23860
  • Re-design Env of the global object init checker #24107

Experimental: Into

Experimental: Modularity

  • Simpler inference for tracked #22972

Implicits

  • Only check seen for LazyRef for TypeSizeAccumulator #20459
  • Derived members succeed other givens in cycle test #23898

Linting

  • Drill through type lambda for tree symbol #23699
  • Warn unused masking imports, remove obsolete unused options #23757
  • Unused lint does not rewrite suppressed warnings #24055
  • Check for synthetic case methods in unused lint #24239

Match Types

  • Prioritize tree type over proto type when typing Binds #24175

Metaprogramming

  • Warn about encoded pkg obj names #22707

Named Tuples

  • Prohibit selection of tuples with members named apply. #24191
  • Add an Ordering given instance for named tuples #23379
  • Named tuple toMap extension method #23827

Opaque Types

  • Prevent opaque types leaking from transparent inline methods #23792
  • Make opaque types decomposable #24068

Parser

  • Make consume a soft modifier #23755

Pattern Matching

  • Fix false exhaustivity warning for seq match #23968
  • Use upper bound of abstract types in exhaustivity checking #23909

Pickling

  • Cleanup the type of UnApply trees in posttyper #24259

Presentation Compiler

  • Make sure that we can query tree.source #24123
  • Add unsafe RawPresentationCompiler implementation #24133

Reporting

  • Fix span of private this warning #23947
  • Improve printing of strings #22945
  • Better grouping of explanations in error messages #24155
  • Better error message: reassignment to val #24184

Reflection

  • Add missing apply constructors for Refined and TypeProjection TypeTrees #23837

REPL

  • Use PPrint to handle printing of REPL output values #23849
  • Invoke pprint reflectively #24119
  • Consider rendering prefix when pretty printing values in the REPL #24118
  • Trap Ctrl-C in the REPL: if no command is running clear the prompt, if some command is running ask for confirmation before exiting #24127
  • Re-implement Ammonite's Ctrl-C interruption for Scala REPL via bytecode instrumentation #24194
  • Remove pipes from multi-line REPL prompts #24307
  • Reintroduce reflective REPL pprint call. #24353

Scala Runner

  • Drop scala_legacy and MainGenericRunner #24244
  • Drop -run and -repl in MainGenericCompiler #24289
  • Bump Scala CLI to v1.10.0 (was v1.9.1) and Coursier to v2.1.25-M19 (was 2.1.24) #24362

Scaladoc

  • Add FlexibleType support for scaladoc #23320
  • Render @consume as the consume modifier #23754
  • Do not render consume update in scaladoc #23760

Scala.js

  • Upgrade to Scala.js 1.20.1. #23884
  • Support js.async and js.await, including JSPI on Wasm. #23846
  • Add JS-specific version of VarArgsBuilder. #24144
  • Port scala-stdlib for Scala.js #24115
  • Do not patch the implicit scope of scala.Unit in Scala.js #24405

Settings

  • Option warnings are conditional #13915
  • Make -usejavacp a private setting as -Yusejavacp #24304

Specification

  • Update reference syntax documentation with named tuples #23493

Standard Library

  • Embed the history of the scala 2 stdlib #23099
  • Add language import in stdlib #23102
  • Add transparent modifier to already assumed transparent types #23104
  • Do not patch stdlib symbols anymore #23193
  • Stabilise Predef.runtimeChecked too #23917
  • Simplify scala.runtime.Statics.releaseFence #23953
  • Deprecate scala.runtime.SymbolLiteral #23970
  • Standard Library Sync: September 24th, 2025 #24063
  • Update method signatures in RedBlackTree to accept correct Iterators #24085
  • Module classes can sometimes extend scala.runtime.AbstractFuntionN in Scala 2 #24147
  • Drop redundant scala.caps.Pure parent traits in stdlib #24149
  • Better support for nullability in Option.apply and drop Option.fromNullable #24238
  • Officially deprecate scala.App in Scala 3 #24242
  • Be more conservative in what we copy from Scala 2 #24339
  • Fix the dependencies of the bootstrapped stdlib #24379
  • Fix bytecode attributes for patched files #24180
  • Add library.properties to resources of scala-library jars #24332

Quotes

  • Make typeArgs in QuotesImpl work for AnnotatedTypes #24018
  • Quotes reflect: Allow to return DefDef from a val symbol tree #22603
  • Add ensureApplied to the quotes reflect API #24160
  • Chore: do not assume scala types as transparent, source should enforce it #23105
  • Add missing version of ValDef.let which also accepts flags #23388
  • Stabilise Quotes reflect methods used for creating new classes/objects #23826

TASTy Format

  • Update the TastyFormat for matches with sub-cases #23851

Testing

  • Fix line and path separators in test #23534

Transform

  • Check extension method at typer #24199
  • Elide conversion of receiver, extension or inline map, trailing implicit args, in DropForMap #23416
  • Replace sun.misc.Unsafe used in LazyVals with VarHandles #24109
  • Handle FlexibleTypes in asContextFunctionType #23865
  • No mixin forwarder when ancestor is sealed #23482
  • Emit mixin forwarders as ordinary, non-bridge methods again #23942
  • Improve the generic signatures for singleton types #24288

Typeclass Derivation

  • Support Mirror for generic tuples arity > 22 #23363

Typer

  • Disable distribution of intersection types over applied types #23441
  • Push distributivity rule to source future #24376
  • Fix crash in Selectable unapply with custom applyDynamic #24343
  • Tweak tryParameterless to use readapt #24078
  • Mark the type of lifted definitions as inferred #24104
  • Fix "Regression in zio/zio-schema for typer/implicit resolution" #24156

Union types

  • Discard scala.caps.Pure in the erasure of union and intersection types #24151
  • Modify rule for nullable union types in generic signatures #24129
  • Modify type erasure logic of nullable unions for Scala 2 pseudo-unions #24130

Contributors

Thank you to all the contributors who made this release possible 🎉

According to git shortlog -sn --no-merges 3.7.4..3.8.0-RC1 these are:

   163  Martin Odersky
   144  Hamza Remmal
    84  noti0na1
    73  Som Snytt
    39  Eugene Flesselle
    21  Wojciech Mazur
    19  Jan Chyb
    17  Oliver Bračevac
    17  Sébastien Doeraene
    13  Li Haoyi
    12  Yichen Xu
    11  HarrisL2
    11  Natsu Kagami
    10  Matthias Berndt
     8  Kacper Korban
     8  aherlihy
     7  EnzeXing
     7  dependabot[bot]
     5  Emil Ejbyfeldt
     5  Matt Bovel
     5  Seyon Sivatharan
     5  Tomasz Godzik
     4  Piotr Chabelski
     4  Zieliński Patryk
     3  Jeon Yoonjae
     3  Kenji Yoshida
     3  Yoonjae Jeon
     3  rjolly
     2  Jamie Thompson
     2  Katarzyna Marek
     2  Raphael Jolly
     2  katrinafyi
     1  Aleksey Troitskiy
     1  Alex1005a
     1  Florian3k
     1  Guillaume Martres
     1  Jędrzej Rochala
     1  Kalin-Rudnicki
     1  Lukas Rytz
     1  Martin Duhem
     1  Martynas Mickevičius
     1  Max Smirnov
     1  Mirco Dotta
     1  Patryk Zieliński
     1  Paweł Perłakowski
     1  Vadim Chelyshov
     1  vder
     1  zielinsky
     1  虎鸣

Don't miss a new scala3 release

NewReleases is sending notifications on new releases.