github scala/scala3 3.8.0

latest releases: 3.8.2-RC1, 3.8.1
5 hours ago

Please use Scala 3.8.1
Version 3.8.0 was published with runtime regressions.

Highlights of the release

  • Require JDK 17+ #24146
  • 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
  • Support JDK 26 #24430
  • Make scala.caps.Pure non-experimental #23745
  • Allow annotations to annotate themselves #24447
  • Changed indicator for LTS/Next series indicator in pom.xml #24709

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

  • 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
  • Avoid blowup of compute times for ill-formed retains #24564
  • Fix apply rule #24273

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
  • Fix #24440: Do not check public flexible types on artifact symbols or inside anonymous classes #24471

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

JVM Backend

  • Fix generic signatures for mixin forwarders conflicting type parameter names #24567
  • Look at the underlying of a TermRef for a getter #24565
  • Refine parameter adaptation logic for arrays #23591
  • Fix #24573: Add stricter checks for platform SAM compatibility #24624
  • Only rename method type params shadowing enclosing class type params #24684
  • Update BackendUtils.classfileVersionMap #23954
  • Refine TypeErasure.samExpansionNotNeeded to check parent traits if SAM is covered #24843

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
  • CheckUnused examines type of Apply #24465
  • Suggest runtimeChecked in warning/error messages #24672
  • Parameter name can be masked in import #24635

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

Packaging

  • Ensure scala3-library does not contain .class or .tasty files #24714
  • Ensure that scala3-library artifacts are empty #24816
  • Actively remove Scala 2 pickles and emit synthetic TASTy attribute for copied stdlib .class files #24846

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

Performance

  • Make compilationUnitInfo of TastyLoader lazy #24604
  • Strip CC annotations in TypeMap when CC is not enabled #24556

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
  • Cleanups and source compatibility improvements for repl.AbstractFileClassLoader #24514
  • Fix REPL interrupt instrumentation conditional #24837

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
  • Bump Scala CLI to 1.10.1 (was 1.10.0) #24448
  • Bump Scala CLI to 1.11.0 (was 1.10.1) and coursier to 2.1.25-M21 (was 2.1.25-M19) #24739

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
  • Revert "do not patch the implicit scope of scala.Unit in Scala.js" #24475
  • Have the correct properties when testing Scala.js #24463
  • Add missing mapSourceURI for scala-library-sjs project #24450

Settings

  • Option warnings are conditional #13915
  • Make -usejavacp a private setting as -Yusejavacp #24304
  • Add missing -language:experimental.* settings #24513
  • Indicate deprecated option aliases #24359

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
  • Make Java defined functions nullary when we override them #24461
  • Allow to compile scala.AnyVal with Scala 3 #24406
  • Fix #24599: Remove | Null from implicit BigDecimal conversion similar to BigInt #24600
  • Deprecate the content of the scala.runtime.stdLibPatches package #24587
  • Make scala.Predef capture checked #24643
  • Make style-only changes to doc comments for the standard library. #24754
  • Update to new wildcard syntax in library scaladoc #24751
  • Synchronize standard library sources with Scala 2.13.18 #24788
  • Use up-to-date sources of Scala 2.13 stdlib when patching Scala 3 bytecode #24855
  • Add @uncheckedOverride annotation for definitions that may override #24545
  • Deprecate MapOps.KeySet, replace with private (and more performant) strict/lazy KeySet implementations #24767

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
  • Fix #24547: Strip inferred retains annotation from Macro/inline call trees #24560

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
  • Fix #24456: Cleanup the info of a Bind symbol in posttyper #24490
  • Ignore selection prototypes when typing type applications #24489
  • Fix #24571: Handling nullable types in convertTo for adapting number constants to target number types #24580
  • Tweak type for tryParameterless #24716

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 these are:

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

Don't miss a new scala3 release

NewReleases is sending notifications on new releases.