Path to this page:
Subject: CVS commit: pkgsrc/lang/gleam
From: nikita
Date: 2023-07-30 22:27:59
Message id: 20230730202800.07FEAFBDB@cvs.NetBSD.org
Log Message:
gleam: update to version 0.30.4
Changelog:
## v0.30.4 - 2023-07-26
- External implementations are always referenced directly in generated code, to
avoid the overhead of an extra function call.
- Fixed a bug where the compiler could infer incorrect generic type parameters
when analysing a module without type annotations with self recursive
functions that reference themselves multiple times.
## v0.30.3 - 2023-07-23
- Fixed a bug where JavaScript module path such as `node:fs` would be rejected.
- New Gleam projects are created with `gleam_stdlib` v0.30, Erlang OTP v26.0.2,
Elixir v1.15.4, actions/checkout v3.5.1, and erlef/setup-beam v1.16.0.
## v0.30.2 - 2023-07-20
- Fixed a bug where the compiler could infer incorrect generic type parameters
when analysing a module without type annotations with self recursive
functions.
- Fixed a bug where the formatter would incorrectly format external functions
by breaking the return annotation instead of the function arguments.
## v0.30.1 - 2023-07-13
- Fixed a bug where the language server could fail to import path dependencies
in monorepos.
## v0.30.0 - 2023-07-12
- A warning is now emitted for the deprecated external fn syntax.
## v0.30.0-rc4 - 2023-07-10
- An error is now emitted for invalid JavaScript external implementations.
- Fixed a bug where Erlang external implementations could generate invalid code.
## v0.30.0-rc3 - 2023-07-05
- Fixed a bug where `gleam fix` would fail to parse command line flags.
## v0.30.0-rc2 - 2023-07-03
- Fixed a bug where `gleam fix` would merge external functions of the same name
but incompatible types.
- Fixed a bug where external function arguments would incorrectly be marked as
unused.
## v0.30.0-rc1 - 2023-06-29
- The new `@target(erlang)` and `@target(javascript)` attribute syntax has been
added for conditional compilation. The existing `if` conditional compilation
syntax has been deprecated. Run `gleam fix` to update your code.
- The new `type TypeName` syntax syntax replaces the `external type TypeName`
syntax. The existing external type syntax has been deprecated. Run `gleam format`
to update your code.
- Adding a new dependency now unlocks the target package. This helps avoid
failing to find a suitable version for the package due to already being
locked.
- A custom message can now be specified for `panic` with `panic as "..."`.
- The syntax for specifying a custom message for `todo` is now `todo as \
"..."`.
- The Erlang error raised by `let assert` is now tagged `let_assert`.
- Types named `Dynamic` are now called `dynamic_` in Erlang to avoid a clash
with the new Erlang `dynamic` type introduced in OTP26.
- Dependencies can now be loaded from paths using the
`packagename = { path = "..." }` syntax in `gleam.toml`.
- The `javascript.deno.unstable` field in `gleam.toml` can now be used to
enable Deno's unstable APIs when targeting JavaScript.
- Blockquotes are now styled in rendered HTML documentation.
- The `gleam` property can be set in `gleam.toml` can be set to a version
requirement to specify the version of Gleam required to build the project.
- Type aliases can now refer to type aliases defined later in the same module.
- Fixed a bug where unapplied record constructors in constant expressions would
generate invalid Erlang.
- Fixed a bug where the prescedence of `<>` and `|>` would clash.
- Fixed a bug where `gleam docs build` would print an incorrect path upon
completion.
- Warnings from dependency packages are no longer surfaced in the language
server.
- A warning is now emitted when a Gleam file is found with an invalid name.
- A warning is now emitted when using `list.length` to check for the empty list,
which is slow compared to checking for equality or pattern matching (#2180).
- The new `gleam remove <package_name>` can be used to remove dependencies
from a Gleam project.
- Fixed a bug where the formatter could crash.
- Fixed a bug where invalid Erlang would be generated when piping into `panic`.
- The `gleam docs build` command gains the `--open` flag to open the docs after
they are generated (#2188).
- Fixed a bug where type annotations for constants could not be written with
type annotations.
- Updated font loading in generated HTML documentation to fix an issue with
fonts not loading properly in some browsers (#2209).
## v0.29.0 - 2023-05-23
- New projects now require `gleam_stdlib` v0.29.
## v0.29.0-rc2 - 2023-05-22
- The `gleam lsp` command is no longer hidden from the help output.
- Fixed a bug where some language server clients would show autocompletion
suggestions too eagerly.
## v0.29.0-rc1 - 2023-05-16
- The language server will now provide autocomplete suggestions for types and
values either imported or defined at the top level of the current module.
- Fixed a bug where record patterns using the spread operator (`..`) to discard
unwanted arguments would not type check correctly when the record had no
labelled fields.
- Add support for using sized binary segments in pattern matches when targeting
JavaScript.
- A warning is now emitted for double unary negation on ints (`--`) and bools
(`!!`) as this does nothing but return the original value.
- Previously the build tool would discard the entire build directory when \
dependencies
were changed. Now it will only discard the build artefacts for removed
dependencies.
- The errors emitted when a name is reused in a module have been made clearer.
- Fixed an incorrect URL in the error message for failing to parse a let binding
with a type annotation.
- Fixed a bug where shadowing a prelude type name could result in incorrect
errors in exhaustiveness checking.
- Fixed a bug where the language server would in some scenarios not remove an
error diagnostic after it becomes outdated.
- Fixed a bug where the formatter would incorrectly format blocks with a comment
before them that were the only argument to a function call.
- Fixed a bug where the language server would not reset the build directory when
it was created by a different version of Gleam.
- New Gleam projects are created with `erlef/setup-beam@v1.15.4` in their GitHub
actions CI configuration.
- Running a module now uses the dependency's target and runtime in its `gleam.toml`.
Files: