|
| 1 | +# Highlights of the release |
| 2 | + |
| 3 | +- Warn if `for` with many vals and overloaded `map` [#25090](https://github.com/scala/scala3/pull/25090) |
| 4 | +- Support `:dep ...` to add library dependenceies in the Scala REPL [#24131](https://github.com/scala/scala3/pull/24131) |
| 5 | +- Upgrade to Scala.js 1.20.2. [#24898](https://github.com/scala/scala3/pull/24898) |
| 6 | +- Bump Scala CLI to v1.12.2 (was 1.11.0) [#25217](https://github.com/scala/scala3/pull/25217): |
| 7 | + * New aliases for RC and nightly Scala versions |
| 8 | + * Detailed changelog available in scala-cli release notes for versions: [v1.12.0](https://github.com/VirtusLab/scala-cli/releases/tag/v1.12.0), [v1.12.1](https://github.com/VirtusLab/scala-cli/releases/tag/v1.12.1) and [v1.12.2](https://github.com/VirtusLab/scala-cli/releases/tag/v1.12.2) |
| 9 | + |
| 10 | +# Other changes and fixes |
| 11 | + |
| 12 | +## Context Functions |
| 13 | + |
| 14 | +- Inferred Contextual params are less nameable [#24381](https://github.com/scala/scala3/pull/24381) |
| 15 | + |
| 16 | +## Desugaring |
| 17 | + |
| 18 | +- A comprehension with valdef aliases is never a candidate for map elimination. [#23448](https://github.com/scala/scala3/pull/23448) |
| 19 | + |
| 20 | +## Experimental: Capture Checking |
| 21 | + |
| 22 | +- Capture Checking of Lazy Vals [#24261](https://github.com/scala/scala3/pull/24261) |
| 23 | +- Represent read-only with a classifier [#24295](https://github.com/scala/scala3/pull/24295) |
| 24 | +- Fix typing closure blocks where result type refers to a closure parameter. [#24299](https://github.com/scala/scala3/pull/24299) |
| 25 | +- Systematically recompute denotations when needed in rechecker phases [#24302](https://github.com/scala/scala3/pull/24302) |
| 26 | +- Ensure that read-only methods don't use exclusive capabilities [#24311](https://github.com/scala/scala3/pull/24311) |
| 27 | +- Handle capture parameters in dcs [#24328](https://github.com/scala/scala3/pull/24328) |
| 28 | +- Don't prematurely force info of fields with inferred types [#24336](https://github.com/scala/scala3/pull/24336) |
| 29 | +- Disallow fresh caps from parameter bounds in results [#24541](https://github.com/scala/scala3/pull/24541) |
| 30 | +- Avoid box failures and better diagnosis if they come back [#24546](https://github.com/scala/scala3/pull/24546) |
| 31 | +- Freshen all explicit arguments of type applications [#24354](https://github.com/scala/scala3/pull/24354) |
| 32 | +- Optimize and harden isCaptureChecking tests [#24439](https://github.com/scala/scala3/pull/24439) |
| 33 | +- Add Unscoped classifier [#24470](https://github.com/scala/scala3/pull/24470) |
| 34 | +- Optimization: Introduce CompactAnnotation [#24679](https://github.com/scala/scala3/pull/24679) |
| 35 | + |
| 36 | +## Experimental: Seperation Checking |
| 37 | + |
| 38 | +- Changes to Mutable [#24352](https://github.com/scala/scala3/pull/24352) |
| 39 | +- Don't crash when update is used as a modifier outside cc [#24378](https://github.com/scala/scala3/pull/24378) |
| 40 | +- Imply `update` only for consume methods in Mutable classes [#24383](https://github.com/scala/scala3/pull/24383) |
| 41 | +- Decompose Mutable [#24495](https://github.com/scala/scala3/pull/24495) |
| 42 | +- Add freeze wrapper (2) [#24518](https://github.com/scala/scala3/pull/24518) |
| 43 | +- Make Arrays mutable types under separation checking [#24649](https://github.com/scala/scala3/pull/24649) |
| 44 | + |
| 45 | +## Experimental: Explcit Nulls |
| 46 | + |
| 47 | +- Relax flow typing checks on Flexible Types [#24278](https://github.com/scala/scala3/pull/24278) |
| 48 | +- Do not expose flexible types [#24292](https://github.com/scala/scala3/pull/24292) |
| 49 | +- Do not search contextual function type in union types in general [#24393](https://github.com/scala/scala3/pull/24393) |
| 50 | +- Add jspecify NonNull annotation to NotNullAnnots list [#24487](https://github.com/scala/scala3/pull/24487) |
| 51 | +- Recognize Nullable annotations in explicit nulls [#25237](https://github.com/scala/scala3/pull/25237) |
| 52 | + |
| 53 | +## Experimental: Global Initialization |
| 54 | + |
| 55 | +- Global object init checker gives warning when accessing an object before its super constructor finishes [#24349](https://github.com/scala/scala3/pull/24349) |
| 56 | + |
| 57 | +## Annotations |
| 58 | + |
| 59 | +- Accommodate adapted Scala 2 annotation value [#17516](https://github.com/scala/scala3/pull/17516) |
| 60 | +- Harden Annotation.refersToParamOf [#24647](https://github.com/scala/scala3/pull/24647) |
| 61 | +- Do not allow `@targetName` on primary constructor too [#24682](https://github.com/scala/scala3/pull/24682) |
| 62 | + |
| 63 | +## Coverage |
| 64 | + |
| 65 | +- Fix issues with Scala.js and coverage [#24769](https://github.com/scala/scala3/pull/24769) |
| 66 | +- Make coverage support incremental compilation [#24773](https://github.com/scala/scala3/pull/24773) |
| 67 | +- Improvement: Try to optimize coverage phase [#24925](https://github.com/scala/scala3/pull/24925) |
| 68 | + |
| 69 | +## Enums |
| 70 | + |
| 71 | +- Lint enum case in outer context [#24652](https://github.com/scala/scala3/pull/24652) |
| 72 | + |
| 73 | +## Exports |
| 74 | + |
| 75 | +- Preserve select of exported member in newExpr [#24570](https://github.com/scala/scala3/pull/24570) |
| 76 | + |
| 77 | +## Erasure |
| 78 | + |
| 79 | +- Fix isJvmAccessible to handle nested protected Java classes [#24625](https://github.com/scala/scala3/pull/24625) |
| 80 | + |
| 81 | +## Inline |
| 82 | + |
| 83 | +- Allow references to erased values in types [#24421](https://github.com/scala/scala3/pull/24421) |
| 84 | +- Cast inline call results to result type, not method type [#25111](https://github.com/scala/scala3/pull/25111) |
| 85 | +- Fix "Compiler crash when calling another file's inline def that uses a private constructor" [#24941](https://github.com/scala/scala3/pull/24941) |
| 86 | + |
| 87 | +## Implicits |
| 88 | + |
| 89 | +- Avoid more constraints in result if trying views [#24369](https://github.com/scala/scala3/pull/24369) |
| 90 | + |
| 91 | +## Initialization |
| 92 | + |
| 93 | +- Skip caret when source is missing in initialization checker [#23926](https://github.com/scala/scala3/pull/23926) |
| 94 | + |
| 95 | +## JVM Backend |
| 96 | + |
| 97 | +- Preserve singleton types for final val aliases to Java enum constants [#24980](https://github.com/scala/scala3/pull/24980) |
| 98 | + |
| 99 | +## Linting |
| 100 | + |
| 101 | +- Suppression matches inlined positions [#24092](https://github.com/scala/scala3/pull/24092) |
| 102 | +- Wshadow option recognizes Wall [#24469](https://github.com/scala/scala3/pull/24469) |
| 103 | + |
| 104 | +## Nullability |
| 105 | + |
| 106 | +- Record NotNullInfo for exceptional try-catch [#24320](https://github.com/scala/scala3/pull/24320) |
| 107 | + |
| 108 | +## Overloading |
| 109 | + |
| 110 | +- Ignore selection prototypes when typing type applications [#24489](https://github.com/scala/scala3/pull/24489) |
| 111 | +- Fix varargs overload resolution with wildcard types [#24669](https://github.com/scala/scala3/pull/24669) |
| 112 | +- Fix override checking for Java methods with covariant array [#24408](https://github.com/scala/scala3/pull/24408) |
| 113 | + |
| 114 | +## Parser |
| 115 | + |
| 116 | +- Permit new with trivial end [#24331](https://github.com/scala/scala3/pull/24331) |
| 117 | +- Single line case lambda gets a region [#24497](https://github.com/scala/scala3/pull/24497) |
| 118 | +- Error tree on outdent is zero extent [#23796](https://github.com/scala/scala3/pull/23796) |
| 119 | + |
| 120 | +## Pattern Matching |
| 121 | + |
| 122 | +- Fix false exhaustivity for GADT under separate compilation [#23966](https://github.com/scala/scala3/pull/23966) |
| 123 | + |
| 124 | +## Presentation Compiler |
| 125 | + |
| 126 | +- Create extension method in infer method action [#24721](https://github.com/scala/scala3/pull/24721) |
| 127 | +- Exclude XRayModeHint for synthetics [#24722](https://github.com/scala/scala3/pull/24722) |
| 128 | +- Fix incorrect XRay hint [#24738](https://github.com/scala/scala3/pull/24738) |
| 129 | +- Improve multi-line code message rendering [#24723](https://github.com/scala/scala3/pull/24723) |
| 130 | +- Improvement: Allow passing `-explain` to the presentation compiler [#24740](https://github.com/scala/scala3/pull/24740) |
| 131 | +- Handle inlined tree in implicit parameter inlay hints [#24762](https://github.com/scala/scala3/pull/24762) |
| 132 | + |
| 133 | +## REPL |
| 134 | + |
| 135 | +- Improve REPL code, echo and exception highlighting with pprint and fansi [#24298](https://github.com/scala/scala3/pull/24298) |
| 136 | +- Replace REPL signal handling with raw mode jline terminal to make Ctrl-C handling work when REPL is a child process [#24842](https://github.com/scala/scala3/pull/24842) |
| 137 | +- Fix "Colon as operator part at beginning of line in REPL" [#24942](https://github.com/scala/scala3/pull/24942) |
| 138 | +- Fix "REPL dependency on scala-parallel-collections doesn't work" [#25064](https://github.com/scala/scala3/pull/25064) |
| 139 | +- Fix "Still can't use scala-parallel-collections in REPL via :dep" [#25092](https://github.com/scala/scala3/pull/25092) |
| 140 | + |
| 141 | +## Reporting |
| 142 | + |
| 143 | +- Addendum when apply error involves default arg [#21133](https://github.com/scala/scala3/pull/21133) |
| 144 | +- Forward reference error includes line numbers [#22534](https://github.com/scala/scala3/pull/22534) |
| 145 | +- Improve error messages for scope extrusion errors [#24318](https://github.com/scala/scala3/pull/24318) |
| 146 | +- Use a better span for an anonymous class [#24640](https://github.com/scala/scala3/pull/24640) |
| 147 | +- Add ErrorMessageID to -Winfer-union warnings (#25073) [#25249](https://github.com/scala/scala3/pull/25249) |
| 148 | + |
| 149 | +## Scaladoc |
| 150 | + |
| 151 | +- Allow to additional scalacOptions in Markdown code snippets [#24755](https://github.com/scala/scala3/pull/24755) |
| 152 | + |
| 153 | +## Standard Library |
| 154 | + |
| 155 | +- Enable capture checking on Tuple [#24345](https://github.com/scala/scala3/pull/24345) |
| 156 | +- Update `StringOps.padTo` implementation [#24575](https://github.com/scala/scala3/pull/24575) |
| 157 | +- Use `String.repeat` in `scala.io.Source` [#24594](https://github.com/scala/scala3/pull/24594) |
| 158 | +- Ensure stability of `IArray.tapEach` [#24727](https://github.com/scala/scala3/pull/24727) |
| 159 | + |
| 160 | +## TASTy |
| 161 | + |
| 162 | +- Pickle CompactAnnotations as regular annotations [#25213](https://github.com/scala/scala3/pull/25213) |
| 163 | +- Drop spurious applies in unpickler and inliner [#25201](https://github.com/scala/scala3/pull/25201) |
| 164 | + |
| 165 | +## Transform |
| 166 | + |
| 167 | +- Adjust purity of trait with lazy member [#23788](https://github.com/scala/scala3/pull/23788) |
| 168 | + |
| 169 | +## Tuples |
| 170 | + |
| 171 | +- Fix inconsistent `typeSize` calculation for `TupleN` vs recursive pair encodings [#24743](https://github.com/scala/scala3/pull/24743) |
| 172 | + |
| 173 | +## Typer |
| 174 | + |
| 175 | +- Dealias type of type constructor in `typedAppliedTypeTree` [#24522](https://github.com/scala/scala3/pull/24522) |
| 176 | +- Improve TypeVar instantiation logic [#24697](https://github.com/scala/scala3/pull/24697) |
| 177 | +- Try to instantiate TypeVars inside `pt` when possible [#24231](https://github.com/scala/scala3/pull/24231) |
| 178 | +- Error instead of crash when generating trees referring to skolems [#24380](https://github.com/scala/scala3/pull/24380) |
| 179 | +- Try to fix callee type inference in typedFunctionValue [#24732](https://github.com/scala/scala3/pull/24732) |
| 180 | +- Fix wildcardArgOK for mixed wildcard/concrete type args [#25001](https://github.com/scala/scala3/pull/25001) |
| 181 | + |
| 182 | +## Union types |
| 183 | + |
| 184 | +- Dealias in isSimpleThrowable check [#24744](https://github.com/scala/scala3/pull/24744) |
| 185 | + |
| 186 | +## Value class |
| 187 | + |
| 188 | +- Avoid NPE when calling hashCode on a value class wrapping null [#25110](https://github.com/scala/scala3/pull/25110) |
| 189 | + |
| 190 | +## Quotes |
| 191 | + |
| 192 | +- Make `quotes.reflect.Position.ofMacroExpansion` consider `-Ymagic-offset-header` [#24301](https://github.com/scala/scala3/pull/24301) |
| 193 | + |
| 194 | +# Contributors |
| 195 | + |
| 196 | +Thank you to all the contributors who made this release possible 🎉 |
| 197 | + |
| 198 | +According to `git shortlog -sn --no-merges 3.8.1..3.8.2` these are: |
| 199 | + |
| 200 | +``` |
| 201 | + 103 Martin Odersky |
| 202 | + 93 Hamza Remmal |
| 203 | + 79 Wojciech Mazur |
| 204 | + 36 Som Snytt |
| 205 | + 27 noti0na1 |
| 206 | + 16 Rikito Taniguchi |
| 207 | + 9 Li Haoyi |
| 208 | + 8 Matt Bovel |
| 209 | + 8 Oliver Bračevac |
| 210 | + 7 Kenji Yoshida |
| 211 | + 7 Natsu Kagami |
| 212 | + 7 Tomasz Godzik |
| 213 | + 7 Yichen Xu |
| 214 | + 6 Jan Chyb |
| 215 | + 6 Piotr Chabelski |
| 216 | + 5 Zieliński Patryk |
| 217 | + 5 dependabot[bot] |
| 218 | + 4 HarrisL2 |
| 219 | + 4 Lukas Rytz |
| 220 | + 3 Jamie Thompson |
| 221 | + 2 Chua Chee Seng |
| 222 | + 2 Fengyun Liu |
| 223 | + 2 Guillaume Martres |
| 224 | + 2 Lluc Santamaria Riba |
| 225 | + 2 Sébastien Doeraene |
| 226 | + 1 Alex1005a |
| 227 | + 1 Bill Venners |
| 228 | + 1 Emil Ejbyfeldt |
| 229 | + 1 EnzeXing |
| 230 | + 1 Evgeny Vereshchagin |
| 231 | + 1 Jeon Yoonjae |
| 232 | + 1 Lorenzo Gabriele |
| 233 | + 1 Seth Tisue |
| 234 | + 1 matsu-chara |
| 235 | + 1 rjolly |
| 236 | + 1 zielinsky |
| 237 | +
|
| 238 | +``` |
0 commit comments