Changelog#
Unreleased#
Compiler#
-
The compiler now reports an error when integer and float binary operators are used incorrectly in case expression guards. (Adi Salimgereyev)
-
The compiler now supports string concatenation in clause guards:
case message { #(version, action) if version <> ":" <> action == "v1:delete" -> handle_delete() _ -> ignore() }
Build tool#
-
When adding a package that does not exist on Hex, the message is a bit friendlier. (Ameen Radwan)
-
The
gleam.tomlformat is now consistent. The two sausage-case fields (dev-dependenciesandtag-prefix) have been replaced by snake_case versions. Files using the old names will continue to work. (Louis Pilfold)
Language server#
- The language server now allows extracting the start of a pipeline into a variable. (Giacomo Cavalieri)
Formatter#
Bug fixes#
-
Fixed a bug where some bit array patterns would erroneously be marked as unreachable. (Giacomo Cavalieri)
-
The compiler now correctly tracks the minimum required version for constant record updates to be
>= 1.14.0. (Giacomo Cavalieri) -
The compiler now correctly tracks the minimum required version for expressions in
BitArrays'sizeoption to be>= 1.12.0. (Giacomo Cavalieri) -
Fixed a bug where the formatter would not properly format some function calls if the last argument was followed by a trailing comment. (Giacomo Cavalieri)
-
Fixed a bug where the compiler would generate invalid code on the JavaScript target when using a
caseexpression as the right hand side of an equality check in anassert. (Giacomo Cavalieri) -
The language server no longer recommends the deprecated
@targetattribute. (Hari Mohan) -
The compiler no longer crashes when trying to pattern match on a
UtfCodepoint. (Hari Mohan) -
Fixed a bug that would result in not being able to rename an aliased pattern. (Giacomo Cavalieri)
-
Added an error message when attempting to update packages that are not dependencies of the project, instead of failing silently. (Etienne Boutet, Vladislav Shakitskiy)
-
The build tool now doesn't perform code generation when exporting package interface. (Andrey Kozhev)
-
The "Extract constant" code action now correctly places new constant when function has documentation. For example,
/// Wibble does some wobbling pub fn wibble() { let x = "wobble" // ^ Trigger "Extract constant" here x }Previously, it would incorrectly place it below doc comment:
/// Wibble does some wobbling const x = "wobble" pub fn wibble() { x }Now it will correctly place constant above doc comment:
const x = "wobble" /// Wibble does some wobbling pub fn wibble() { x } -
Fixed a bug where renaming would not work properly if there was an error in target file. (Surya Rose)