github scala/scala3 3.8.2-RC1

pre-release6 hours ago

Highlights of the release

  • Support :dep ... to add library dependenceies in the Scala REPL, add helpful message to //> using dep "..." #24131
  • Warn if type argument was inferred as union type #24258
  • Upgrade to Scala.js 1.20.2. #24898

Other changes and fixes

Context Functions

  • Inferred Contextual params are less nameable #24381

Desugaring

  • A comprehension with valdef aliases is never a candidate for map elimination. #23448

Experimental: Capture Checking

  • Capture Checking of Lazy Vals #24261
  • Represent read-only with a classifier #24295
  • Fix typing closure blocks where result type refers to a closure parameter. #24299
  • Systematically recompute denotations when needed in rechecker phases #24302
  • Ensure that read-only methods don't use exclusive capabilities #24311
  • Handle capture parameters in dcs #24328
  • Don't prematurely force info of fields with inferred types #24336
  • Disallow fresh caps from parameter bounds in results #24541
  • Avoid box failures and better diagnosis if they come back #24546
  • Freshen all explicit arguments of type applications #24354
  • Optimize and harden isCaptureChecking tests #24439
  • Add Unscoped classifier #24470
  • Optimization: Introduce CompactAnnotation #24679

Experimental: Seperation Checking

  • Changes to Mutable #24352
  • Don't crash when update is used as a modifier outside cc #24378
  • Imply update only for consume methods in Mutable classes #24383
  • Decompose Mutable #24495
  • Add freeze wrapper (2) #24518
  • Make Arrays mutable types under separation checking #24649

Experimental: Explcit Nulls

  • Relax flow typing checks on Flexible Types #24278
  • Do not expose flexible types #24292
  • Do not search contextual function type in union types in general #24393
  • Add jspecify NonNull annotation to NotNullAnnots list #24487

Experimental: Global Initialization

  • Global object init checker gives warning when accessing an object before its super constructor finishes #24349

Annotations

  • Accommodate adapted Scala 2 annotation value #17516
  • Harden Annotation.refersToParamOf #24647
  • Do not allow @targetName on primary constructor too #24682

Coverage

  • Fix issues with Scala.js and coverage #24769
  • Make coverage support incremental compilation #24773
  • Improvement: Try to optimize coverage phase #24925

Enums

  • Lint enum case in outer context #24652

Exports

  • Preserve select of exported member in newExpr #24570

Erasure

  • Fix isJvmAccessible to handle nested protected Java classes #24625

Inline

  • Allow references to erased values in types #24421

Implicits

  • Avoid more constraints in result if trying views #24369

Initialization

  • Skip caret when source is missing in initialization checker #23926

Linting

  • Suppression matches inlined positions #24092
  • Wshadow option recognizes Wall #24469

Nullability

  • Record NotNullInfo for exceptional try-catch #24320

Overloading

  • Ignore selection prototypes when typing type applications #24489
  • Fix varargs overload resolution with wildcard types #24669
  • Fix override checking for Java methods with covariant array #24408

Parser

  • Permit new with trivial end #24331
  • Single line case lambda gets a region #24497
  • Error tree on outdent is zero extent #23796

Pattern Matching

  • Fix false exhaustivity for GADT under separate compilation #23966

Presentation Compiler

  • Create extension method in infer method action #24721
  • Exclude XRayModeHint for synthetics #24722
  • Fix incorrect XRay hint #24738
  • Improve multi-line code message rendering #24723
  • Improvement: Allow passing -explain to the presentation compiler #24740
  • Handle inlined tree in implicit parameter inlay hints #24762

REPL

  • Improve REPL code, echo and exception highlighting with pprint and fansi #24298
  • Replace REPL signal handling with raw mode jline terminal to make Ctrl-C handling work when REPL is a child process #24842
  • Fix "Colon as operator part at beginning of line in REPL" #24942

Reporting

  • Addendum when apply error involves default arg #21133
  • Forward reference error includes line numbers #22534
  • Improve error messages for scope extrusion errors #24318
  • Use a better span for an anonymous class #24640

Scaladoc

  • Allow to additional scalacOptions in Markdown code snippets #24755

Standard Library

  • Enable capture checking on Tuple #24345
  • Update StringOps.padTo implementation #24575
  • Use String.repeat in scala.io.Source #24594
  • Ensure stability of IArray.tapEach #24727

Transform

  • Adjust purity of trait with lazy member #23788

Tuples

  • Fix inconsistent typeSize calculation for TupleN vs recursive pair encodings #24743

Typer

  • Dealias type of type constructor in typedAppliedTypeTree #24522
  • Improve TypeVar instantiation logic #24697
  • Try to instantiate TypeVars inside pt when possible #24231
  • Error instead of crash when generating trees referring to skolems #24380
  • Try to fix callee type inference in typedFunctionValue #24732
  • Fix wildcardArgOK for mixed wildcard/concrete type args #25001

Union types

  • Dealias in isSimpleThrowable check #24744

Quotes

  • Make quotes.reflect.Position.ofMacroExpansion consider -Ymagic-offset-header #24301

Contributors

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

According to git shortlog -sn --no-merges 3.8.1..3.8.2-RC1 these are:

   101 Martin Odersky
    93 Hamza Remmal
    67 Wojciech Mazur
    34 Som Snytt
    24 noti0na1
    16 Rikito Taniguchi
     8 Oliver Bračevac
     7 Kenji Yoshida
     7 Li Haoyi
     7 Matt Bovel
     7 Natsu Kagami
     7 Tomasz Godzik
     7 Yichen Xu
     6 Jan Chyb
     6 Piotr Chabelski
     5 Zieliński Patryk
     5 dependabot[bot]
     4 HarrisL2
     3 Jamie Thompson
     3 Lukas Rytz
     2 Chua Chee Seng
     2 Fengyun Liu
     2 Guillaume Martres
     2 Lluc Santamaria Riba
     2 Sébastien Doeraene
     1 Alex1005a
     1 Bill Venners
     1 Emil Ejbyfeldt
     1 EnzeXing
     1 Evgeny Vereshchagin
     1 Jeon Yoonjae
     1 Lorenzo Gabriele
     1 Seth Tisue
     1 matsu-chara
     1 rjolly
     1 zielinsky

Don't miss a new scala3 release

NewReleases is sending notifications on new releases.