Scala 3.9.0

3.9.0

3.9.0 LTS

Added 2
  • SIP-71 - Allow fully implicit conversions in Scala 3 with `into` is now stable
  • Scaladoc support for expectations in snippets
Changed 5
  • Remove automatic collection of entry points
  • Restore `Automatic-Module-Name` in standard library's manifest
  • Migrate Scala CLI's using directive parser to a compiler module
  • Upgrade to Scala.js 1.22.0 with stable WebAssembly backend, sbt 2.x support, and WebAssembly configuration
  • Bump Scala CLI to v1.16.0 with JShell support in repl, JUnit 5 support, SBT 2.x exports, WebAssembly support, and Sloth support for patching lazy vals on JDK 24+
Fixed 12
  • Unify annotation handling for thread-safe and unsafe lazy vals
  • Ignore `@throws` annotation on non-methods
  • Use `IndexOutOfBoundsException` constructor with `Int`
  • Emit acceptable Java generic signatures for HKTs
  • Unwrap refined types for Java generic signatures
  • Fix Java signatures for arrays of value classes

From Scala

Highlights of the release

  • Long Term Support
  • SIP-71 - Allow fully implicit conversions in Scala 3 with into is now stable #26184
  • Remove automatic collection of entry points #25215
  • Scaladoc: support expectations in snippets #25713
  • Restore Automatic-Module-Name in standard library's manifest #26218
  • Migrate Scala CLI's using directive parser to a compiler module #26449
  • Upgrade to Scala.js 1.22.0. #26389
  • Bump Scala CLI to v1.16.0 #26703:
    • JShell support in repl
    • JUnit 5 (Jupiter) support
    • SBT 2.x exports
    • Dropped Ammonite support
    • WebAssembly support (experimental)
    • Sloth support - patch Scala 3.0-3.7 lazy vals on classpath using sun.misc.Unsafe to JDK 24+ compatible implementation (experimental)
    • Refer to Scala CLI v1.15.0 and v1.16.0 for details

Other changes and fixes

Annotations
  • Unify annotation handling for thread-safe & -unsafe lazy vals #24907
  • Ignore @throws annotation on non-methods #26802
JVM Backend
  • Use IndexOutOfBoundsException constructor with Int #24764
  • Emit acceptable Java generic signatures for HKTs #25540
  • Unwrap refined types for Java generic signatures #25626
  • Fix Java signatures for arrays of value classes #25631
  • Fix Java generic signatures for context functions #25632
  • Handle HKT bounds in Java generic signatures #25744
  • Emit nested module classes as static inner classes #26137
  • Don't skip generic signature for constructors with generic using parameters #26302
  • Fix generic signature of trait val setter #26374
  • Reliably decide whether to generate static forwarders #26510
  • Fix generic signatures for inherited inner classes #26549
  • Fix regression #26374: generic signatures of mixed-in trait setters #26542
  • Fix regression #26550: revert isPrimitiveValueType change #26565
  • Emit inline info attribute #26650
  • Stop hiding errors in GenericSignatureVisitor #26632
  • Emit a super init call for primitives on the JVM #26630
  • Box bounded arguments of HKT result types in Java generic signatures #26787
  • Fix issue with reading legal java cyclic signatures #26775
  • Do not emit Java generic signatures for trait private val setters #26633
Constructors
  • Lambda-owned param ref in ctor incurs no field #23286
Coverage
  • Fix #25624: Scoverage and separation checking failures #25625
  • Scoverage: do not instrument methods that have too large bodies #25629
  • Scoverage & CC interaction: exempt CC nested symbols from @experimental check #25687
  • Coverage + Experimental nested match cases interaction fix #25913
  • Scoverage: fix broken warnings related to tail recursion and infinite loop detection #25941
  • Scoverage: correctly detect curried constructor applications #26048
  • Scoverage: correctly lift wildcard and singleton types #26049
  • Scoverage: refrain from lifting closures for capture calculus compatibility #26067
  • Scoverage: fix lifted type computation for parameterless methods #26069
  • Scoverage: Fix coverage parameterless select qualifier casts #26087
Desugaring
  • Bail out of patDef opt for .runtimeChecked, not only @unchecked #26774
  • Desugaring: avoid patdef optimization for lazy vals #26770
Directives Parser
  • Refactor directives-parser #26461
  • Minor using directives parser improvements #26460
  • Add missing directives-parser artifacts to the released artifacts #26516
Documentation
  • Sys, concurrent, runtime (1): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25371
  • Collection mutable (2): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25372
  • Collection immutable (3): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25373
  • Collection core (4): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25374
  • Numeric types (5): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25375
  • Array, IArray, Predef, Option (6): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25376
  • Math (7): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25377
  • Quoted, compiletime (8): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25378
  • Jdk (9): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25379
  • Util, io, ref (10): fill in missing @param, @tparam, and @return tags in Scaladoc comments #25380
  • Improve sizeCompare doc #25696
  • Function, Tuple, Product (12): fill in missing @param, @tparam, and @return tags in Scaladoc comments (V2) #25996
  • Improve Scaladoc for Tuple#map #26060
  • Fixed broken URL links. #26064
  • Enable sc:compile for stdlib package scala.annotation #25836
  • Enable sc:compile for stdlib package scala.beans #25837
  • Enable sc:compile for stdlib package scala.collection #25838
  • Enable sc:compile for stdlib package scala.collection.convert #25839
  • Fix secondary constructor capture checking #25841
  • Enable sc:compile for stdlib package scala.collection.generic #25845
  • Enable sc:compile for stdlib package scala.collection.immutable #25855
  • Enable sc:compile for stdlib package scala.collection.mutable #25860
  • Enable sc:compile for stdlib package scala.collection.compat #25861
  • Enable sc:compile for stdlib package scala.compiletime #25862
  • Enable sc:compile for stdlib package scala.concurrent #25867
  • Enable sc:compile for stdlib package scala.io #25868
  • Enable sc:compile for stdlib package scala.jdk #25870
  • Enable sc:compile for stdlib package scala.math #25878
  • Enable sc:compile for stdlib package scala.quoted #25912
  • Enable sc:compile for stdlib package scala.reflect #25915
Enums
  • Adjust error on bad enum #23080
  • Preserve Java enum semantics for explicit java.lang.Enum inheritance #25658
Erasure
  • Preserve erased flags on synthetic context-function parameters #25751
  • Fix #24653: Erase aliases of Unit as result type to void. #26192
  • Erase more aliases of Unit as result type to void. #26252
  • Fix a couple issues related to erased value types #26213
Expression Compiler
  • Fix expression evaluation in debugger under -old-syntax #26096
Extension Methods
  • Fix: #24765 SAM conversion for extension method from self-based types #25637
GADTs
  • Preserve GADT constraints until PatternMatcher #26805
Implicits
  • Fixes #24914 Treat equivalent candidates as divergent in implicit search #25910
  • Disallow implicit conversion to AnyRef again. #26210
Incremental Compilation
  • Support zinc invalidation for type arguments in macro calls #23900
  • Ignore annotations no longer on the classpath in ExtractAPI #25889
  • Fixes #21383 enable Mode.ReadPositions when reading annotation trees #25911
Inline
  • Fixes #26015: Start of NoSpan in adaptToArgs fallBack #26017
  • Fixes #25754: Preserve apply result type after beta reducing through opaque proxies #25988
  • Fix regression #26153 (in dotty-cps-async) use typer skolems as inline proxy's type #26563
Lambda Lift
  • Fixes #25943: Track super-calls as call edges in LambdaLift #26029
Linting
  • Improve unused check of variable in assignment body #24685
  • Warn about dollars in names of definitions unless backticked #24690
  • Do not warn on dollars in Java names #26303
  • Use precise type for x in case x @ (_: A, _: B), take 2 #26161
  • Ignore coverage probes in unused update analysis #26711
  • Fix false unused-var warning on self-assignment reads (#26620) #26635
Opaque Types
  • Fix crash on invalid opaque type in package #26118
  • Fix crash when unapply returns a Boolean-deriving opaque type #26658
Parser
  • Fix span of xml literal #15635
  • Warn if name of empty template has trailing colon #23907
  • Warn dubious negative literal syntax #24163
  • Fix "Compiler crashes when illegal signature of applyDynamic is used " #24974
  • Check ascription in valdef pattern #25597
  • Parse Java annotations on wildcard type arguments #26187
Pattern Matching
  • Make sealed abstract java classes exhaustive checkable #25788
  • Fix #25866: match-alias subtyping and wildcard appliedTo #25981
Pickling
  • Fixes #25801: Handle TypeDefs in ensureHasSym #26011
Presentation Compiler
  • Bugfix: Fix issue with empty name throwing exceptions #25752
  • Improvement: improve perfomance of the presentation compiler #25769
  • Bugfix: Don't add square braces in context bounds #25798
  • Bugfix: Show hover on derives clause #25804
  • Fix warnings in presentation-compiler #25827
  • Improvement: Add -Wunused:all to presentation-compiler #26113
  • Reset dirty unimported state after findRef #26412
Quotes
  • Check that Closures refer to anonymous functions under -Xcheck-macros #26050
  • Consistently use xCheckMacroAssert in QuotesImpl #26053
  • Deprecate JPath use in Quotes #26446
Releases
  • Generate provenance attestation #26748
REPL
  • CC & REPL: restore :type, :doc, and tab completions #25789
  • Avoid JLine warning about CompletingParsedLine #25917
  • Mostly fix REPL in sbt #25925
  • Fix REPL silently exiting after first user input #25969
  • Relax typer position assert in interactive mode #26130
  • Vendor REPL dependencies #26433
  • Fix :help regressions #26301
  • REPL: attempt to detect user overridden toString for Product #26451
Reporting
  • Use context.outers instead of owner chain to find class for suspicious top-level resolution #20717
  • Feat: Add actionable diagnostic for missing members #23572
  • Include span of bad args if multiline #25699
Rewrites
  • Fixes #26013: Wrap with->& rewrite in parens for typed patterns #26016
Scala-JS
  • Tolerate empty paths in JSPositions conversion #26140
Scaladoc
  • Avoid NPE in Scaladoc signatures on JDK 25 #25779
  • Scaladoc: fix 'occured' -> 'occurred' typos in user-visible error strings #25805
  • Fix scaladoc checkErrorCodeSnippets #25942
  • Stop using custom fonts for Scaladoc #26393
  • Scaladoc snippets: fix Show all lines & Scastie popup theme bugs #26165
  • Scaladoc: Remove jquery and hanging javascript assets. #22014
  • Scaladoc: add fallback lookup from nearest package #26661
  • Fix Scaladoc top package order to be alphabetical #26653
  • Scaladoc: Fix variable expansion #26730
Standard Library
  • Optimize the standard library in bootstrapped compilation #25689
  • Change lower bound of Option.orNull to nullable #25733
  • Use unchecked on some pattern matches #25762
  • Remove self reference in Conversion class and add impure conversion test #25931
  • Fix potential NPE in BoxesRunTime.equalsCharObject #25958
  • Safer equalsNumChar #25962
  • Fixes #25702: Avoid AnyClass fallback in requiredClass #26010
  • Fix 26026: restore type parameter of Option.orNull #26027
  • Fix mismatch between wrapArray and wrapArrayMethodName #26162
  • Make Option.orNull public in binary #26751
TASTy
  • Skip unresolved annotation trees (during TASTy loading) #26520
Transform
  • Find correct type when generating the generic signature of trait fields #25543
  • Remove questionable transform of Select from SelectStatic #25620
  • Resurrect some Scala 2 tests for generic signatures #25736
  • Emit generic signatures for all trait fields #25780
  • Fix generic signatures of forwarders containing value classes #25879
  • Generic signature fixes #25880
  • Fix crash during generic signature emission for inner classes of type aliases #26202
  • Don't eliminate var used by anonfun #26360
Typeclass Derivation
  • Fix synthesis of mirrors for GADT with dependent type parameters #26080
  • Fix stale baseTypeCache after synthetic Product.Mirror parents added #26714
Typer
  • Change typeOfArg to take TypedArg instead of Arg #25418
  • Make Constant construction type-directed #25869
  • Fix #25894: break cross-unit cyclic export on partial recompile #25900
  • Fixes #24056 Dealias value class types in structural access #25907
  • Fixes #20010 Avoid crash on missing TASTy class references #25908
  • Fixes #24719 Fix LazyAnnotation.tree reentrance in Namer.addChild #25909
  • Fixes for 2 code quality findings #25960
  • Fixes #25856: Position not set crash in implicit search during import qualifier #26032
  • Preserve type info when lifting stable arguments #26063
  • Fix memberType for constructor params #25669
Value Classes
  • Replicate value class erasure binary compat hack in GenericSignatures #25775
Experimental: Capture Checking
  • Enable sc:compile for scala.util Package #25651
  • Make tests for capability parents of Array class more robust #25695
  • Refine isStatic test in SafeRefs.isSafe #25708
  • Go back to explicit @retains instead of uses_init in stdlib #25719
  • Change syntax of what was uses_init #25720
  • Several fixes to the handling of static objects and recheckIdent #25770
  • Fix #25388: Enhance safe check for synthetic annotations #25883
  • Keep annotations when converting in Setup to dependent function #25891
  • Properly solve capture set during box adaptation #25902
  • Make parameter types of some closures explicit #25967
  • Clarify use-capset test #25976
  • Drop SharedCapability exception in subsumes #26078
  • Tighten check of field classifiers #26085
  • Don't assume classes with self aliases to be pure. #26097
Experimental: Erased definitions
  • Fix bridge generation when erased precedes a non-erased parameter #25923
  • Fix bridge typing when erased precedes a non-erased parameter #26047
Experimental: Explicit Nulls
  • Fix issue with flexifying unions from Java symbols under explicit-nulls #25808
Experimetnal: Safe Mode
  • Assume safe IllegalArgumentException and NoSuchElementException #25859
Experimental: Strict Equality
  • Enable strictEqualityPatternMatching behaviour for non-case objects #25850
  • Fixes #25979: Fix strictEqualityPatternMatching with GADTs #25980

Contributors

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

According to git shortlog -sn --no-merges 3.8.4..3.9.0 these are:

    105	Solal Pirelli
    55	Martin Odersky
    41	Wojciech Mazur
    29	Som Snytt
    24	Oliver Bračevac
    22	Matt Bovel
    19	Claude
    17	Chua Chee Seng
    17	Piotr Chabelski
    16	Anatolii Kmetiuk
    13	Patryk Zieliński
    13	Rikito Taniguchi
    12	Bill Venners
     9	Jamie Thompson
     9	Tomasz Godzik
     7	Sébastien Doeraene
     6	Oron Port
     6	dependabot[bot]
     5	Jan Chyb
     4	Li Haoyi
     4	Puerco
     4	noti0na1
     3	Emil Ejbyfeldt
     2	Alex Archambault
     2	HarrisL2
     2	Seth Tisue
     2	Yichen Xu
     1	Arnout Engelen
     1	Bartłomiej Kozak
     1	Guillaume Martres
     1	Hamza Remmal
     1	Jack Koenig
     1	Jakub Warchoł
     1	Jeon Yoonjae
     1	Kasper Kondzielski
     1	Mathias
     1	Matthias Berndt
     1	Matthias Kurz
     1	Ondrej Lhotak
     1	Ondřej Lhoták
     1	Sai Asish Y
     1	Sylvain Kuchen
     1	Zieliński Patryk
     1	lalala194
     1	pgilliar
View original

Upgraded? How did it go?

Discussion