github scala/scala3 3.1.0

latest releases: 3.6.0-RC1, 3.6.1, 3.5.2...
3 years ago

Scala 3.1 is backwards binary-compatible with Scala 3.0: libraries compiled with 3.0.x can be used from 3.1 without change.

Notable changes

  • New experimental feature: safer exceptions #11721
  • Emit efficient code for switch over strings #11937
  • Add reflect SourceFile.{getJPath,name,path} #13177
  • Support -Wconf and @nowarn #12857
  • Fix #9482: simplified Manifest synthesis #13142
  • Scaladoc: Integrate Scastie into Scaladoc #13258
  • Add reflect Unapply.apply #13298
  • Change @experimental spec #13305
  • Update the tasty inspector returned value #13316
  • Add Wildcard in reflection #13363
  • Add TypedOrTest as super type of Typed in reflection #13362

Stabilized API

  • scala.Selectable.WithoutPreciseParameterTypes #13315
  • Symbol member methods in reflection API #13314
  • scala.quoted.Type.valueOfTuple #13313
  • Quotes abort API #13312
  • Quotes.reflect.TermParamClause.isErased #13311

Other improvements

Language and compiler

  • Add CanEqual typeclass instances of Option, Either and Tuple for strictEquality #12419
  • Synthesise Mirror.Sum for nested hierarchies #11686
  • Added better explanation for tree, that cannot be typed #12717
  • Allowing local variables to be initialized with non-hot values in initialization checker #12867
  • Use StringConcatFactory for string concatenation on JDK 9+ #12929
  • Add explanation to "already defined" message #13090
  • Do not require @experimental on anonymous classes #13155
  • Make body of quotes inlinable #13188
  • REPL: display the compiler + Java version on startup #13193
  • Teach backend to emit iinc instructions #13214
  • Allow IntSetting's to be set with a colon #13267
  • Add CanEqual typeclass instance for Seq to match Nil case#13265
  • Simplify & clarify TASTy isVersionCompatible #13280
  • Allow semicolon between type match cases #13338
  • Allow experimental erased in experimental scopes #13394
  • Add TypeRepr.isTupleN to reflection API #13384
  • Allow experimental language imports in experimental scopes #13417
  • Allow -source 3.1 as a version #13617

Documentation

  • Update the docs, change sidebar url property to page/index #13004
  • Inkuire search engine UI improvements #13052
  • Generate flat documentation structure for API rather than putting everything in api directory #13130
  • Add heuristic to support Context Bounds #13172
  • Add snippet includes feature. Introduce new snippet UX/UI. #13217
  • Add version browsing for nightlies #13244
  • Fetch Inkuire at scaladoc build instead of documentation generation #13287

SemanticDB

  • Signature information #12885
  • Support new Scala3 modifiers #13239
  • Support synthetics: implicit params, context params, and implicit conversions #13288
  • Support overridden_symbols#13295

Other bug fixes

  • Fix parsing Java annotation values #11809
  • Fix #11318: Assertion failed when not adding prefix to extension method in method body #11882
  • Fix #10900: Avoid loop for F-bounds in checkCanEqual #12747
  • Fix regression in provablyDisjoint #12786
  • Do no widen constant type on selector type in inline matches #12902
  • Make def generated from givens not synthetic #12979
  • Fix non-determinism in -Ysafe-init external method trace: #12989
  • Exhaustivity warnings on nested case classes #13030
  • Fix constructors Java generic signatures #13047
  • Set TimeZone for version number #13051
  • Avoid auto-tupling in unapply unless a tuple is expected #13063
  • Handle overloaded members when generating Java varargs bridges #13066
  • Fix definition of enclosingExtensionMethod #13078
  • Fix syntax of extension methods #13079
  • Refine "can be handled by parent" condition when generting bridges #13092
  • Suppress "no outer defs" check for Java sources #13108
  • Fix MatchError in Scaladoc Scalajs script #13115
  • Escape illegal characters in scaladoc code blocks #13118
  • Run PatternMatcher earlier, in the group before ExplicitOuter #13124
  • Deskolemise patterns to suppress exhaustivity warnings #13137
  • Analyze end markers when looking ahead #13139
  • Fix #13131: escape java array in ClassTag #13156
  • Handle isDefinedInCurrentRun on no symbol #13157
  • call deleteOnExit() after creating temporary scripting compile directory #13171
  • Detect cyclic dependencies when loading modules #13178
  • Fix #12800: Clarify match type reduction error on empty scrutinee #13184
  • Fix intrinsic types documentation when there is no scala package on files to document path #13185
  • Remove color from scala.compiletime.codeOf #13186
  • Scaladoc fix 12813: type parameter in extension method is wrong #13191
  • Scaladoc fix #13148: Empty argument list is not shown in scaladoc in some cases #13192
  • Fix inherit doc warnings #13199
  • Fix bugs in RemoteLinksTests #13200
  • Scaladoc fix [#13194]: Ill formated codeblock #13202
  • Fix self types appearing as inherited in docs and docs leaking self type methods #13207
  • Fix #12178: cannot resolve ValueOf for type literal argument of opaque types #13210
  • Make Hole a proper Tree in Trees #13213
  • Weaken assertion for duplicate attachments #13224
  • Employ frozen_<:< instead of <:< within EtaExpansion extractor logic #13229
  • Fix docs of Reflect.Symbol.children #13232- Fix #13141 remove spurious coercion of * to a type identifier (was already a valid identifier) #13237
  • Don't export members that will be synthesized in case classes #13234
  • Fix a bug causing Scaladoc break when -release option is set. #13233
  • Fix running JARs from scala script #13246
  • Fix inspectTastyFilesInJar in TastyInspector #13254- Fix #10077: No kind inference for match types #13264
  • Fix executable jars #13263
  • Fix #9675: Type _ in MT patterns with correct kind #13262
  • Handle type alias in capturing wildcards #13260
  • Fix MatchError when printing match types from macros #13278
  • Decouple -print-tasty from compiler #13276
  • Emit unicode instead of octal literals #13273
  • Enter symbols under their target names after erasure #13269
  • Fix missing symbol occurrence of type params' type bounds for constructor #13284
  • Fix Context leak in deffered Annotation tree #13301
  • Reimplement constraint merging for correctness #13292
  • Restore unreachable warnings by converting literals #13290
  • Don't print parser output twice #13330
  • Allow prefix operators on the LHS of assignments #13328
  • Better utilizing GADT bounds for HKTs #13323
  • Fix displaying some signatures in scaladoc #13317
  • wildApprox: also approximate FunProto arguments #13361
  • Avoid crash by handling by-names under Typed #13354
  • Do not harmonize constant args if their type doesn't affect resType #13353
  • Fix #12973: scala 3 repl does not work with -cp argument, needs -repl as workaround #13343
  • Avoid cycle with F-bounded inner Java class #13341
  • Fix #13221: Set JavaStatic on Module fields of module classes in JSCodeGen. #13381
  • Fix unsound injectivity assumption when inferring GADT bounds #13380
  • Fix #13310: Parse empty Java compilation units as EmptyTree #13378
  • Print the type parameter bounds of higher kinded types #13372
  • Disallow inline secondary constructors #13370
  • Fix 12600: Handle ExprType during tab completion #13368- Fix transient in stdlib #13425
  • Enter implicit members in scope when inlining #13415
  • Fix problem when making package objects explicit during unpickling #13413
  • Remove leading infix test for if condition #13412
  • Don't crash when calling gc() on a committed TyperState #13408
  • Fix #10747: Raise type error on unreducible match type #12768
  • Set typer phase after InteractiveDriver.run #13530
  • Make batch files support installation path containing spaces #13577
  • Fix #13626: Wrong position of quote content #13627
  • Fix #10867: Normalize after applyIfParameterized in superType #13253
  • Generate static forwarders for object members in companion interface #13573

Contributors

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

According to git shortlog -sn --no-merges 3.0.2..3.1.0 these are:

    61  Martin Odersky
    51  tanishiking
    50  Nicolas Stucki
    39  Kacper Korban
    33  Andrzej Ratajczak
    22  Dale Wijnand
    22  Olivier Blanvillain
    21  Lukas Rytz
    17  Filip Zybała
    16  Yichen Xu
    15  Rikito Taniguchi
    14  Sébastien Doeraene
    12  Krzysztof Romanowski
    11  EnzeXing
     9  Guillaume Martres
     9  Jamie Thompson
     8  Tom Grigg
     6  Seth Tisue
     5  Alec Theriault
     4  Michał Pałka
     4  Phil
     3  Fengyun Liu
     3  Paweł Marks
     2  Vadim Chelyshov
     2  Dmitrii Naumenko
     2  Julien Richard-Foy
     2  Kevin Lee
     2  Liu Fengyun
     2  Stéphane Micheloud
     2  Tomasz Godzik
     2  Adrien Piquerez
     2  adampauls
     2  noti0na1
     1  Kai
     1  Jeremy Smith
     1  Som Snytt
     1  Anselm von Wangenheim
     1  Boris
     1  Arnout Engelen
     1  odersky
     1  Anatolii Kmetiuk
     1  PJ Fanning
     1  Matthieu Bovel
     1  Performant Data
     1  Mario Bucev
     1  Ruslan Shevchenko

Reporting Bugs

If you encounter a bug, please open an issue! 🙏

Don't miss a new scala3 release

NewReleases is sending notifications on new releases.