Changelog#
Unreleased#
Compiler#
-
Generated JavaScript functions, constants, and custom type constructors now include any doc comment as a JSDoc comment, making it easier to use the generated code and browse its documentation from JavaScript. (Giacomo Cavalieri)
-
The code generated for a
caseexpression on the JavaScript target is now reduced in size in many cases. (Surya Rose) -
The code generators now perform usage-based dead code elimination. Unused definitions are not longer generated. (Louis Pilfold)
-
echonow has better support for character lists, JavaScript errors, and JavaScript circular references. (Louis Pilfold) -
The look of errors and warnings has been improved. Additional labels providing context for the error message are no longer highlighted with the same style as the source of the problem. (Giacomo Cavalieri)
-
Gleam will now emit a helpful message when attempting to import modules using
.instead of/.error: Syntax error ┌─ /src/parse/error.gleam:1:11 │ 1 │ import one.two.three │ ^ I was expecting either `/` or `.{` here. Perhaps you meant one of: import one/two import one.{item}(Zij-IT)
-
The compiler now emits a warning when a top-level constant or function declaration shadows an imported name in the current module. (Aayush Tripathi)
-
The compiler can now tell when an unknown variable might be referring to an ignored variable and provide an helpful error message highlighting it. For example, this piece of code:
pub fn go() { let _x = 1 x + 1 }Now results in the following error:
error: Unknown variable ┌─ /src/one/two.gleam:4:3 │ 3 │ let _x = 1 │ -- This value is discarded 4 │ x + 1 │ ^ So it is not in scope here. Hint: Change `_x` to `x` or reference another variable
Build tool#
-
gleam update,gleam deps update, andgleam deps downloadwill now print a message when there are new major versions of packages available.$ gleam update Resolving versions The following dependencies have new major versions available: gleam_http 1.7.0 -> 4.0.0 gleam_json 1.0.1 -> 3.0.1 lustre 3.1.4 -> 5.1.1
Language server#
Formatter#
Bug fixes#
-
Fixed a bug where the language server would not show type-related code action for record fields in custom type definitions. (cysabi)
-
Fixed a bug where the "Inline variable" code action would be offered for function parameters and other invalid cases. (Surya Rose)
-
Fixed a bug where the "Inline variable" code action would not be applied correctly to variables using label shorthand syntax. (Surya Rose)
-
Fixed a bug where the compiler would emit the same error twice for patterns with the wrong number of labels. (Giacomo Cavalieri)
v1.11.1 - 2025-06-05#
Compiler#
-
The displaying of internal types in HTML documentation has been improved. (Louis Pilfold)
-
A warning is now emitted when the same module is imported multiple times into the same module with different aliases. (Louis Pilfold)
Bug fixes#
- Fixed a bug where a bit array segment matching on a floating point number
would match with
NaNorInfinityon the JavaScript target. (Giacomo Cavalieri)