Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

1<!-- 2 SPDX-License-Identifier: Apache-2.0 3 SPDX-FileCopyrightText: 2020 The Gleam contributors 4--> 5 6# Changelog 7 8## v1.15.0 - 2026-03-16 9 10- Fixed a bug where the language server wouldn't show the correct hover for some 11 patterns. 12 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 13 14## v1.15.0-rc2 - 2026-03-16 15 16### Bug fixes 17 18- Marked the `bitSize` and `bitOffset` fields of `BitArray$BitArray` TypeScript 19 definition as optional. 20 ([acandoo](https://github.com/acandoo)) 21 22- Fixed invalid JavaScript code generation when ints or floats had prefixed `0`s 23 before and after an `_` (e.g. `000_001`). 24 ([Gavin Morrow](https://github.com/gavinmorrow)) 25 26## v1.15.0-rc1 - 2026-03-04 27 28### Compiler 29 30- The compiler now reports an error when int and float binary operators are 31 used incorrectly in case expression guards. 32 ([Adi Salimgereyev](https://github.com/abs0luty)) 33 34- The compiler now supports string concatenation in clause guards: 35 36 ```gleam 37 case message { 38 #(version, action) if version <> ":" <> action == "v1:delete" -> 39 handle_delete() 40 _ -> ignore() 41 } 42 ``` 43 44 ([Adi Salimgereyev](https://github.com/abs0luty)) 45 46- Improved the code generated on the Erlang target when dividing a `Float` 47 number by the literal number `0.0`. 48 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 49 50- The compiler no longer shows the structure of internal types when displaying 51 an "Inexhaustive patterns" error, making it harder to inadvertently rely on 52 internal implementation details. 53 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 54 55- The JavaScript prelude TypeScript API now contains the `BitArray$isBitArray` 56 and `BitArray$BitArray$data` functions. 57 ([Louis Pilfold](https://github.com/lpil)) 58 59- The type-checking JavaScript functions for Gleam data structure now use the 60 `value is TypeName` TypeScript return type rather than `boolean`. 61 ([Louis Pilfold](https://github.com/lpil)) 62 63- The compiler now shows better error message on passing unexpected labeled 64 arguments by taking into account, whether it's a function or a constructor. 65 ([Andrey Kozhev](https://github.com/ankddev)) 66 67### Build tool 68 69- Upgraded `actions/checkout` from v4 to v6 in the GitHub Actions workflow used 70 by `gleam new`. 71 ([Christian Widlund](https://github.com/chrillep)) 72 73- When adding a package that does not exist on Hex, the message is a bit 74 friendlier. 75 ([Ameen Radwan](https://github.com/Acepie)) 76 77- The `gleam.toml` format is now consistent. The two sausage-case fields 78 (`dev-dependencies` and `tag-prefix`) have been replaced by snake_case 79 versions. Files using the old names will continue to work. 80 ([Louis Pilfold](https://github.com/lpil)) 81 82- The password used for encrypting new local Hex API keys must now be at least 83 8 characters in length. 84 ([Louis Pilfold](https://github.com/lpil)) 85 86- The `gleam help add`, `gleam help deps`, and `gleam help docs` commands have 87 been improved with much more detailed documentation output. 88 ([Louis Pilfold](https://github.com/lpil)) 89 90- When attempting to publish a package on Hex with an already taken name, 91 the message is clearer. 92 ([vyacheslavhere](https://github.com/vyacheslavhere)) 93 94- The build tool will now refuse to publish any package that has the default 95 README generated by the `gleam new` command. 96 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 97 98- The build tool now uses OAuth and time-based one-time-passwords for 99 authentication with Hex, improving security. 100 Any legacy API tokens previously stored will be revoked after authenticating 101 using OAuth. 102 ([Louis Pilfold](https://github.com/lpil)) 103 104- The build tool will now refuse to publish any package that has no README, or 105 an empty README. 106 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 107 108### Language server 109 110- The language server now allows extracting the start of a pipeline into a 111 variable. 112 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 113 114- The language server now shows hover information when hovering over custom type 115 definitions. 116 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 117 118- The language server now shows hover information when hovering over a custom 119 type's constructors. 120 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 121 122- The language server is now smarter when producing autocompletions. Imagine 123 you're updating your code to fully qualify the uses of the `Json` type: 124 125 ```gleam 126 pub fn payload() -> js|Json 127 // ^ typing the module name 128 ``` 129 130 Accepting the `json.Json` completion will now produce the correct `json.Json` 131 annotation rather than generating invalid code: `json.JsonJson`. 132 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 133 134- The language server now suggests completions for keywords like `echo`, 135 `panic`, and `todo`. 136 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 137 138- The "Add missing patterns" code action will insert a catch all pattern for 139 internal types, making it harder to inadvertently rely on internal 140 implementation details. 141 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 142 143- The language server will no longer show completions for the fields of internal 144 types outside the module they're defined in, making it harder to inadvertently 145 rely on internal implementation details. 146 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 147 148- The language server now suggests a quick-fix code action for when a custom type 149 definition uses a type parameter in its variants that have not been declared in 150 its header. 151 ([Andi Pabst](https://github.com/andipabst)) 152 153- The `Extract function` code action now provides more ergonomic/idiomatic 154 refactorings when used on anonymous functions. 155 ([Hari Mohan](https://github.com/seafoamteal)) 156 157- It's now possible to find references and rename variables in string prefix 158 patterns. 159 160 ```gleam 161 case wibble { 162 "1" as digit <> rest -> digit <> rest 163 // ^^^^^ ^^^^ 164 // You can now trigger "Find references" and "Rename" from here 165 } 166 ``` 167 168 ([Igor Castejón](https://github.com/IgorCastejon)) 169 170- The language server now offers a rename for module when the cursor is placed 171 over its import statement or when placed on its name or alias somewhere. For 172 example, 173 174 ```gleam 175 import lustre/element 176 import lustre/element/html 177 import lustre/event 178 179 fn view(model: Int) -> element.Element(Msg) { 180 // ^ Renaming module to `el` here 181 let count = int.to_string(model) 182 183 html.div([], [ 184 html.button([event.on_click(Incr)], [element.text(" + ")]), 185 html.p([], [element.text(count)]), 186 html.button([event.on_click(Decr)], [element.text(" - ")]), 187 ]) 188 } 189 ``` 190 191 Using renaming when hovering on module name will would result in the 192 following code: 193 194 ```gleam 195 import lustre/element as el 196 import lustre/element/html 197 import lustre/event 198 199 fn view(model: Int) -> el.Element(Msg) { 200 let count = int.to_string(model) 201 202 html.div([], [ 203 html.button([event.on_click(Incr)], [el.text(" + ")]), 204 html.p([], [el.text(count)]), 205 html.button([event.on_click(Decr)], [el.text(" - ")]), 206 ]) 207 } 208 ``` 209 210 ([Vladislav Shakitskiy](https://github.com/vshakitskiy)) 211 212- The "Fill labels" code action now uses variables from scope when they match 213 the label name and expected type, using shorthand syntax (`name:`) instead of 214 `name: todo`. 215 216 ([Vladislav Shakitskiy](https://github.com/vshakitskiy)) 217 218- The "Interpolate String" code action now lets the user "cut out" any portion 219 of a string, regardless of whether it is a valid Gleam identifier or not. 220 ([Hari Mohan](https://github.com/seafoamteal)) 221 222- When interpolating an expression at the very start or the very end 223 of a string, redundant empty strings are no longer added before/after the 224 interpolated expression. 225 ([Hari Mohan](https://github.com/seafoamteal)) 226 227- The language server now performs best-effort zero value generation for 228 `decode.failure` when using the `Generate Dynamic Decoder` code action. 229 ([Hari Mohan](https://github.com/seafoamteal)) 230 231- The `Generate Dynamic Decoder` and `Generate To-JSON Function` code action 232 now generate a decoder and an encoder, respectively, for `Nil` values. 233 ([Hari Mohan](https://github.com/seafoamteal)) 234 235- The language server now supports renaming, go to definition, hover, and 236 finding references from expressions in case clause guards. 237 ([Surya Rose](https://github.com/GearsDatapacks)) 238 239- The language server now supports `textDocument/foldingRange`, enabling 240 folding for contiguous import blocks and multiline top-level definitions such 241 as function bodies, custom types, constants, and type aliases. 242 243 For example, this import block: 244 245 ```gleam 246 import gleam/int 247 import gleam/list 248 import gleam/string 249 ``` 250 251 can now be folded in the editor to: 252 253 ```gleam 254 import gleam/int ... 255 ``` 256 257 ([Aayush Tripathi](https://github.com/aayush-tripathi)) 258 259- The function signature helper now displays original function definition 260 generic names when arguments are unbound. For example, in this code: 261 262 ```gleam 263 pub fn wibble(x: something, y: fn() -> something, z: anything) { Nil } 264 265 pub fn main() { 266 wibble( ) 267 // ↑ 268 } 269 ``` 270 271 will show a signature help 272 273 ```gleam 274 wibble(something, fn() -> something, anything) 275 276 ``` 277 278 instead of 279 280 ```gleam 281 wibble(a, fn() -> a, b) -> Nil 282 ``` 283 284 ([Samuel Cristobal](https://github.com/scristobal)) 285 286### Formatter 287 288- The formatter no longer wraps multiple tuple or field access into a block. 289 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 290 291### Bug fixes 292 293- The compiler now emits correctly-scoped JavaScript code for `case` expressions 294 whose subjects directly match one of the branches. 295 ([Justin Lubin](https://github.com/justinlubin)) 296 297- Fixed a bug where some bit array patterns would erroneously be marked as 298 unreachable. 299 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 300 301- Fixed a bug where the Gleam standard library's `dict.each` function would 302 incorrectly be assumed to be pure. 303 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 304 305- The compiler now correctly tracks the minimum required version for constant 306 record updates to be `>= 1.14.0`. 307 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 308 309- The compiler now correctly tracks the minimum required version for 310 expressions in `BitArray`s' `size` option to be `>= 1.12.0`. 311 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 312 313- Fixed a bug where the formatter would not properly format some function calls 314 if the last argument was followed by a trailing comment. 315 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 316 317- Fixed a bug where the compiler would generate invalid code on the JavaScript 318 target when using a `case` expression as the right hand side of an equality 319 check in an `assert`. 320 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 321 322- Fixed a bug where the compiler would generate invalid code on the JavaScript 323 target for some `case` expressions using clause guards. 324 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 325 326- The formatter no longer stack overflows trying to format lists with many 327 items. 328 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 329 330- Fixed a bug where the formatter would not be able to consistently format a 331 constant list with an `@internal` attribute. 332 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 333 334- The "convert to pipe" code action now works on nested function calls as well, 335 rather than always being applied to the outermost one. 336 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 337 338- Fixed a bug where the compiler would not detect and reject duplicate modules 339 in a project's dependencies. 340 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 341 342- The language server no longer shows completions when typing a number. 343 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 344 345- The language server no longer recommends the deprecated `@target` attribute. 346 ([Hari Mohan](https://github.com/seafoamteal)) 347 348- The compiler no longer crashes when trying to pattern match on a 349 `UtfCodepoint`. 350 ([Hari Mohan](https://github.com/seafoamteal)) 351 352- Fixed a bug that would result in not being able to rename an aliased pattern. 353 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 354 355- Fixed JavaScript codegen bug for `assert` when using `&&` with comparison 356 operators on the right side. 357 ([vyacheslavhere](https://github.com/vyacheslavhere)) 358 359- Added an error message when attempting to update packages that are not 360 dependencies of the project, instead of failing silently. 361 ([Etienne Boutet](https://github.com/EtienneBoutet), 362 [Vladislav Shakitskiy](https://github.com/vshakitskiy)) 363 364- The build tool now doesn't perform code generation when exporting package 365 interface. 366 ([Andrey Kozhev](https://github.com/ankddev)) 367 368- The "Extract constant" code action now correctly places new constant when 369 function has documentation. For example, 370 371 ```gleam 372 /// Wibble does some wobbling 373 pub fn wibble() { 374 let x = "wobble" 375 // ^ Trigger "Extract constant" here 376 x 377 } 378 ``` 379 380 Previously, it would incorrectly place it below doc comment: 381 382 ```gleam 383 /// Wibble does some wobbling 384 const x = "wobble" 385 386 pub fn wibble() { 387 x 388 } 389 ``` 390 391 Now it will correctly place constant above doc comment: 392 393 ```gleam 394 const x = "wobble" 395 396 /// Wibble does some wobbling 397 pub fn wibble() { 398 x 399 } 400 ``` 401 402 ([Andrey Kozhev](https://github.com/ankddev)) 403 404- Fixed a bug where renaming would not work properly if there was an error in 405 target file. 406 ([Surya Rose](https://github.com/GearsDatapacks)) 407 408- Fixed a bug where generics in custom types would not be properly generated 409 when emitting TypeScript declarations. 410 ([Surya Rose](https://github.com/GearsDatapacks)) 411 412- Fixed a bug where dev dependencies would be compiled and included in 413 production builds such as `gleam export erlang-shipment`. 414 ([John Downey](https://github.com/jtdowney)) 415 416- Fixed a bug where the package cache would not properly be reset when a version 417 of a package was replaced on Hex. 418 ([Surya Rose](https://github.com/GearsDatapacks)) 419 420- Fixed a crash (`bad_generator`) that could occur when a linked OTP process 421 exits with a non-standard exit reason. 422 ([John Downey](https://github.com/jtdowney)) 423 424- Fixed a bug where diagnostic about incorrect `size` and `unit` options would 425 use incorrect error location. 426 ([Andrey Kozhev](https://github.com/ankddev)) 427 428- `gleam add` now adds correct constraints for pre-release versions. 429 ([Andrey Kozhev](https://github.com/ankddev)) 430 431- Fixed a bug where changes to a path dependency's own dependencies were not 432 detected when rebuilding the root project, causing the compiler to report 433 errors about missing modules. 434 ([daniellionel01](https://github.com/daniellionel01)) 435 436- Fixed a bug where the compiler would crash when type-checking record 437 updates if the constructor definition has a positional field defined after 438 labelled fields. 439 ([Hari Mohan](https://gituhub.com/seafoamteal))