Next | Query returned 14 messages, browsing 1 to 10 | Previous

History of commit frequency

CVS Commit History:


   2024-03-05 17:39:18 by nikita | Files touched by this commit (3) | Package updated
Log message:
gleam: update to version 1.0.0

Changelog:

## v1.0.0 - 2024-03-04

### Language changes

- Comments have been added to the JavaScript prelude to indicate which members
  are in the public API and which are internal.

### Build tool

- Fixed a bug where the exported package interface would not have a module's
  documentation.

## v1.0.0-rc2 - 2024-02-14

### Bug fixes

- Fixed a bug where the exhaustiveness checker could crash for some generic
  types.

### Formatter

- The format used by the formatter has been improved in some niche cases.

## v1.0.0-rc1 - 2024-02-10

### Language changes

- Using a reserved word is now a compile error, not a warning.
- Inexhaustive matches are now compile errors, not warnings.
- The warning for an unused module alias now shows how to not assign a name to
  the module.
- Type aliases with unused type parameters now emit an error.
- Type definitions with duplicate type parameters now emit an error.

### Formatter

- Now the formatter will nest pipelines and binary operators that are used as
  function arguments, list items or as tuple items.
- The format function literals used as the last argument in a function call
  on long lines has been improved.

### Build tool

- If a package contains a `todo` expression then the build tool will now refuse
  to publish it to Hex.
- The search bar in generated docs now has a darker background color.
- `gleam export` now takes a `package-interface` option to export a json file
  containing metadata about the root package.
- `gleam docs build` now creates a json file containing metadata about the root
  package.
- The order of dependencies in `manifest.toml` is now in alphabetical order.
- The search bar in generated docs now has a darker background color.
- The generated docs no longer shows whether an argument is discarded or
  not in a function signature.
- It is now possible to use `gleam run -m` to run a dependency module even if
  that dependency uses a compile target that your project does not support.

### Bug fixes

- Fixed a bug the build tool could be make to attempt to run a main function
  that does not support the current target in some circumstances.
- Fixed a bug where the exhaustiveness checker could crash when checking nested
  values inserted into the parent type using type parameters.
- Fixed a bug where `functionname(_name)` would incorrectly parse as a function
  capture instead of a syntax error.
- Fixed a bug where external only functions would "successfully" \ 
compile for a
  target they do not support, leading to a runtime error.
   2024-02-07 16:36:56 by nikita | Files touched by this commit (3) | Package updated
Log message:
gleam: update to version 0.34.1

Changelog:

v0.34.1 - 2023-01-17
Build tool changes

    Support has been added for using SourceHut as a repository.

Bug fixes

    Fixed a bug where long function headers with external implementations could \ 
format incorrectly.
    The @deprecated attribute can now be used to annotate module constants. This \ 
will cause a warning to be emitted when the constant is used.

v0.34.0 - 2023-01-16
v0.34.0-rc3 - 2023-01-12
Language changes

    "echo" is now a reserved word.
    A warning is no longer emitted when a function has a Gleam implementation as \ 
well as external implementations for both targets. This is because having a \ 
default Gleam implementation means the code is future-proof and continues to be \ 
cross platform even if a new target is added.

Bug fixes

    Fixed a bug where function heads would go over the line limit in the formatter.

v0.34.0-rc2 - 2023-01-11
Bug fixes

    Fixed a bug where gleam run would fail when the current directory is not the \ 
root of the project and using the JavaScript target.
    Fixed a bug where the compiler would in some cases fail to error when an \ 
application uses functions that do not support the current compilation target.

v0.34.0-rc1 - 2024-01-07
Language changes

    Warn about function body not being used, because it already has external \ 
implementations for all targets.
    It's now possible to compile a project with external functions in dependency \ 
packages that are not supported by the compilation target so long as they are \ 
not used on the current target.
    The error message for when one imports a constructor instead of an \ 
homonymous type has been improved.

Language Server Changes

    Added a View on HexDocs link on function hover.

Formatter

    Fixed some quirk with the formatting of binary operators.
    Fixed a bug where the formatter would move a function call's closed \ 
parentheses on a new line instead of splitting the function's arguments.
    Now the formatter will format tuples as if they were functions, trying to \ 
first split just the last element before splitting the whole tuple.
    Improved the formatting of multiline strings in string concatenation.

Build tool changes

    The gleam new command now accepts any existing path, as long as there are no \ 
conflicts with already existing files. Examples: gleam new ., gleam new .., \ 
gleam new ~/projects/test.
    The format for the README created by gleam new has been altered.
    The gleam.toml created by gleam new now has a link to the full reference for \ 
its available options.
    The gleam binary is now statically linked on Windows.
    New projects are created requiring between versions of v0.34.0 inclusive and \ 
exclusive v2.0.0.
    The repository section now supports additional VCS types in the form of \ 
codeberg, forgejo and gitea allowing a user, repo and additionally a host url.
    TypeScript declaration for the prelude exports previously missing functions \ 
and classes. Additionally, swaps interfaces for classes and adds missing \ 
attributes to classes.
    gleam commands now look in parent directories for a gleam.toml file.

Bug fixes

    Fixed a bug where gleam add would not update manifest.toml correctly.
    Fixed a bug where fn() { Nil }() could generate invalid JavaScript code.
    Fixed a bug where the build tool would make unnecessary calls to the Hex API \ 
when path dependencies are used.
    Fixed a bug where gleam new would generate a gitignore with build rather \ 
than /build.
    Fixed where the types of generic constants could be incorrecly inferred.
    Utf8Codepoint has been renamed to UtfCodepoint in prelude.d.mts.
    Fixed a bug where gleam deps list would look in filesystem root instead of \ 
the current directory.
    Fixed a bug with the isEqual function in prelude.js where RegExps were being \ 
incorrectly structurally compared and being falsely reported as being equal.
    JavaScript: export from prelude.d.mts in gleam.d.mts to fix the error: \ 
"Type 'Result' is not generic".
    Not providing a definition after some attributes is now a parse error.

v0.33.0 - 2023-12-18
v0.33.0-rc4 - 2023-12-17

    The deprecated bit array options binary and bit_string have been removed.
    The deprecated ambiguous type import syntax has been removed.
    The deprecated BitString type has been removed.
    The deprecated inspect functions and BitString type has been removed from \ 
the JavaScript prelude.

v0.33.0-rc3 - 2023-12-17
Formatter

    The formatter now tries to split long chains of binary operations around the \ 
operator itself, rather than around other elements like lists or function calls.

Bug fixes

    Fixed a bug where string prefix aliases defined in alternative case branches \ 
would all be bound to the same constant.

v0.33.0-rc2 - 2023-12-07
Language changes

    The \e string escape sequence has been removed. Use \u{001b} instead.
    Generated Erlang now disabled redundant case clause warnings as these are \ 
now redundant due to exhaustiveness checking.

Bug fixes

    Fixed a bug where the \u string escape sequence would not work with on \ 
Erlang on the right hand side of a string concatenation.

v0.33.0-rc1 - 2023-12-06
Formatter

    The formatter now tries to keep a function body and its arguments on a \ 
single line by first trying to split only its last argument on multiple lines.
    Fixed a bug where the formatter would move comments out of blocks.
    gleam format now ignores the Gleam build directory by default, even when not \ 
in a git repository.

Language changes

    Gleam now has full exhaustiveness checking. Exhaustiveness issues have been \ 
downgraded from errors to warnings so that existing Gleam code can be upgraded \ 
to be exhaustive without breaking existing code. In a future version they will \ 
be upgraded to errors.
    The ! operator can now be used in clause guards.
    The words auto, delegate, derive, else, implement, macro, and test are now \ 
reserved for future use. If used they will emit a warning. In a future version \ 
this may be upgraded to an error.
    The \u{...} syntax can be used in strings to specify unicode codepoints via \ 
a hexadecimal number with 1 to 6 digits.
    The todo as and panic as syntaxes now accept an expression that evaluates to \ 
a string rather than just a string literal.

Build tool changes

    The gleam run and gleam test commands gain the -t flag, which is an alias of \ 
the --target flag.
    The gleam build, gleam check, gleam run and gleam test commands now also \ 
accept js and erl as values for the --target flag.
    The gleam new command now creates packages at version 1.0.0.
    The gleam publish command now asks for confirmation if the package being \ 
published is not yet version 1.0.0.
    The gleam publish command now asks for confirmation if the package name is \ 
one that implies the package is maintained by the Gleam core team.
    The error messages shown when dependency resolution fails have been improved.

Compiler WASM API

    The WASM API for the compiler has been rewritten to be simpler.
    The WASM API for the compiler now exposes warnings.

HTML documentation generator

    Searching in rendered HTML documentation now also matches words that do not \ 
start with the input but do contain it.

Bug fixes

    Fixed a bug where the JavaScript code generator could generate invalid code \ 
when pretty printing a zero arity function call when the line is over 80 columns \ 
wide.
    Fixed a bug where the build directory could be left in an invalid state if \ 
there is Elixir code to compile and running on Windows without permission to \ 
create symlinks.
    Fixed a bug where numbers with preceeding zeros could generate incorrect \ 
JavaScript.
    The Erlang code generated by the /. operator no longer generates a warning \ 
for the upcoming negative zero float change in Erlang OTP 27.
    Fixed a bug where using only types from an aliased import, wouldn't stop the \ 
compiler from emitting an unused alias warning for that import.
    Fixed a bug where the formatter would remove the  as name from string prefix \ 
patterns.
    Fixed a bug where the formatter would misplace comments at the start of a block.
    Fixed a bug where using a string prefix pattern in let assert would generate \ 
incorrect JavaScript.

v0.32.4 - 2023-11-09
Build tool changes

    The build tool now supports rebar3 and mix hex packages where the package \ 
name differs from the otp application name.

bug fixes

    Fixed a bug where invalid javascript code could be generated when a module \ 
function calls another function that was passed as an argument and the argument \ 
has the same name as the module function.
    Fixed the target property of gleam.toml being ignored for local path \ 
dependencies by gleam run -m module/name

v0.32.3 - 2023-11-07
Language changes

    Imported modules can now be discarded by giving them an alias starting with _.

Build tool changes

    New projects are now generated with the call to gleam format coming last in \ 
the GitHub Actions workflow. This is so that feedback from tests is presented \ 
even if formatting is incorrect.
    Added Windows support for the gleam export erlang-shipment command.

Bug fixes

    Fixed a bug where some nested pipelines could fail to type check.

v0.32.2 - 2023-11-03
Build tool changes

    New Gleam projects are created with gleam_stdlib v0.32 and gleeunit v1.0.

Bug fixes

    Fixed a bug where gleam fix would not produce correct results for code that \ 
shadowed a prelude name with an import of the same name but a different kind.
    Fixed a bug where documentation would not publish to Hexdocs for packages \ 
with a number in the name.
    Fixed a bug where aliased unqualified types and values of the same name \ 
could produce an incorrect error.

v0.32.1 - 2023-11-02
Bug fixes

    Fixed a bug where gleam fix would not produce correct results for code that \ 
shadowed a prelude name with an import of the same name but a different kind.
    Fixed a bug where incorrect JavaScript could be generated due to backwards \ 
compatibility with the deprecated import syntax.

v0.32.0 - 2023-11-01
Bug fixes

    Fixed a bug where running gleam fix multiple times could produce incorrect \ 
results.

v0.32.0-rc3 - 2023-10-26
Bug fixes

    Fixed a bug where gleam fix would fail to update the deprecated type import \ 
syntax for aliased unqualified types.

v0.32.0-rc2 - 2023-10-26
Bug fixes

    Fixed a bug where the backward compatibility for the deprecated import \ 
syntax could result in an import error with some valid imports.

v0.32.0-rc1 - 2023-10-25
Language changes

    Using import module.{TypeName} to import a type has been deprecated, \ 
replaced by import module.{type TypeName}. In a future version of Gleam the old \ 
syntax will only import the value of the same name. Run gleam fix to update your \ 
code.
    The BitString type has been renamed to BitArray. Run gleam fix to update \ 
your code.
    The binary and bit_string bit array modifier have been deprecated in favour \ 
of bytes and bits.
    The error message for when one element in a list doesn't match the others \ 
has been improved.
    The error message for when the elements of a list's tail don't match the \ 
previous ones has been improved.
    The error message for when one tries to access an unknown field has been \ 
improved.
    The __gleam_prelude_variant__ property has been removed from the classes \ 
defined in the JavaScript prelude.
    The deprecated todo("...") syntax has been removed.
    Module access can now be used in case clause guards.
    The JS target now supports bit syntax for module constants.
    The Erlang compiler will no longer emit a duplicate warning for unused functions.
    The @deprecated attribute can now be used with type definitions.
    A warning is now emitted if a module alias is unused.

Language server changes

    The language server now has a code action for removing unused items.
    The language server now shows the type of variables defined using use on hover.

Build tool changes

    The gleam check command supports the target flag.
    The gleam fix command updates code to use BitArray rather than BitString.
    The gleam fix command updates code to use the new import type syntax.
    gleam fix sets the gleam version constraint in gleam.toml to >= 0.32.0.
    The gleam version constraint field in gleam.toml now disregards pre and \ 
build components when checking for compatibility.
    The prelude is no longer rendered once per package when compiling to \ 
JavaScript, instead one copy is rendered for the entire project. If you are \ 
using the gleam compile-package API you now need to give a path to the prelude \ 
using the --javascript-prelude flag.
    The gleam export javascript-prelude and gleam export typescript-prelude \ 
commands have been added to export a copy of the prelude. This command may be \ 
useful for build tools that use the compiler via the gleam compile-package API.
    Fixed a bug where some deprecation messages would not be printed.
    The content has been made wider in rendered HTML documentation.
    Dependencies that can be built with both mix and rebar3 are now built with \ 
mix if it exists on the system, and with rebar3 if it doesn't.

Bug fixes

    "Compiling $package" is now only printed when a package has new \ 
changes to compile.
    The main process started with gleam run no longer traps exits on Erlang.
    The formatting of code in rendered HTML documentation has been improved.
    The formatter no longer moves trailing comments out of custom type definitions.
    Fixed a bug where some hexidecimal numbers would generate incorrect Erlang.
    Fixed a bug where markdown tables would not render correctly in HTML \ 
documentation.
    The float 0.0 is now rendered in Erlang as +0.0 to silence warnings in \ 
Erlang/OTP 27.

v0.31.0 - 2023-09-25

    New Gleam projects are created with gleam_stdlib v0.31, actions/checkout \ 
v3.*, and erlef/setup-beam v1.*.
    A note is included in the generated HTML documentation if a function is \ 
deprecated.

v0.31.0-rc1 - 2023-09-18

    The @deprecated("...") attribute can be used to mark a function as \ 
deprecated. This will cause a warning to be emitted when the function is used.
    A warning is now emitted if a module from a transitive dependency is imported.
    Record access can now be used in case clause guards.
    Fixed a bug where manifest.toml could contain absolute paths for path \ 
dependencies.
    The as keyword can now be used to assign the literal prefix to a variable \ 
when pattern matching on a string.
    The if conditional compilation, external fn, and external type syntaxes have \ 
been removed.
    The description flag for the gleam new command has been removed.
    The highlight.js grammar included with generated HTML documentation has been \ 
updated for the latest syntax.
    Packages are no longer precompiled to Erlang when publishing to Hex if the \ 
package target is set to JavaScript.
    An exception is now raised if JavaScript code uses the BitString class \ 
constructor and passes in the incorrect argument type.
    Fixed a bug where mutually recursive functions could be incorrectly inferred \ 
as having an overly general type.
    Fixed a bug where recursive type constructors could incorrectly infer a type \ 
error.
    Fixed a bug where some mutually recursive functions would be inferred as \ 
having too general a type.
    Fixed a bug where constants where not being correctly inlined when used in \ 
the size option of a bit string pattern match.
    Fixed a bug where anonymous functions could parse successfully when missing \ 
a body.
    Fixed a bug where incorrect unused variable warnings could be emitted for \ 
code that doesn't type check.
    Fixed a bug where packages defaulting to the JavaScript target could have \ 
modules missing from their HTML documentation when published.
    Corrected some outdated links in error messages.
    Hovering over a function definition will now display the function signature, \ 
or the type of the hovered argument.
    Use import type for importing types from typescript declarations.
    Use .d.mts extension for typescript declarations to match .mjs.
    Prefix module names with dollar sign in typescript to avoid name collisions.
   2023-10-25 00:11:51 by Thomas Klausner | Files touched by this commit (2298)
Log message:
*: bump for openssl 3
   2023-07-30 22:27:59 by nikita | Files touched by this commit (3) | Package updated
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`.
   2023-04-17 17:59:41 by Nikita | Files touched by this commit (3)
Log message:
gleam: Update to version 0.28.3

Changelog:

v0.28.3 - 2023-04-17

    Fixed a bug where the language server would show outdated error diagnostics \ 
when a new one was emitted in a different module.
    Fixed a bug where the language server would attempt to analyse Gleam modules \ 
that were outside of the src or test directories.
    New Gleam projects are created with actions/checkout@v3.5.1 and \ 
erlef/setup-beam@1.15.3 in their GitHub actions CI configuration.

v0.28.2 - 2023-04-10

    Fixed a bug where comments above a use expression would be formatted incorrectly.
    Fixed a bug where the formatter would fail to preserve empty lines after a block.
    Fixed a bug where the formatter would fail to preserve empty lines after an \ 
anonymous function with a return annotation.
   2023-04-06 02:26:07 by Nikita | Files touched by this commit (2) | Package updated
Log message:
gleam: update to version 0.28.1

Changelog:

## v0.28.1 - 2023-04-05

- Fixed a bug where the languag server would unset too many error diagnostics
  when multiple projects are open, more than one have errors, and one of them is
  successfully compiled.
- Fixed a bug where the language server would unset error diagnostics when
  displaying information on hover.
   2023-04-03 21:58:03 by Nikita | Files touched by this commit (3)
Log message:
gleam: Update to version 0.28.0

Changelog:
taken from https://github.com/gleam-lang/gleam/blob/main/CHANGELOG.md,
more at https://gleam.run/news/v0.28-monorepos-fast-maps-and-more/

v0.28.0 - 2023-04-03

    New projects now require gleam_stdlib v0.28.

v0.28.0-rc3 - 2023-03-31

    Fixed a bug where source links would be incorrect in HTML documentation.

v0.28.0-rc2 - 2023-03-27

    Fixed a bug where single statement blocks inside binary operators could \ 
generate invalid JavaScript.
    Fixed a bug where the formatter could incorrectly place comments.
    Fixed a bug where the language server would show outdated diagnostics when a \ 
file with an error reverts to the previous valid version, causing the compiler \ 
to use the cached version of the file.

v0.28.0-rc1 - 2023-03-26

    The language server now analyzes files on edit rather than on save, \ 
providing feedback faster.
    The language server now supports editor sessions that span multiple \ 
projects. This is useful for mono-repos and projects with both a frontend and \ 
backend in Gleam.
    The language server now also shows documentation on hover for expressions.
    The language server now shows types and documentation on hover for patterns.
    Added support for negation of integers with the new - unary operator.
    Variable assignments are now only permitted within a function or a block, \ 
not anywhere that an expression is permitted.
    The deprecated try expression has been removed.
    The deprecated assert ... = ... syntax has been removed.
    Semicolons are no longer whitespace. An error will be emitted if one is \ 
encountered.
    Warnings are now immediately emitted rather than being buffered until the \ 
end of the compilation.
    The --warnings-as-errors flag is now supported by gleam build.
    Blocks are now preserved by the formatter when they only have a single \ 
expression within them.
    Generated docs now export more meta data to improve the developer \ 
experience, accessibility and search engine discoverability.
    Files are now only recompiled if they have changed since the last \ 
compilation, detected by file hash and modification time. Previously only the \ 
modification time was used.
    Autocompletion of module imports was removed due to a buggy implementation.
    Fixed a bug where the formatter would incorrectly remove { ... } from bit \ 
string segment value expressions.
    Fixed a bug where TypeScript type definitions files could include incorrect \ 
type names.
    Fixed a bug where the compiler used VSCode specific behaviour in the \ 
language server which was incompatible with Helix.
    Fixed a bug where string concatenation patterns on strings with escape \ 
characters would generate javascript code with wrong slice index.
    Fixed a bug where blocks could parse incorrectly.
    Allow modules to be run with the gleam run --module command.
   2023-03-02 19:53:57 by Nikita | Files touched by this commit (3) | Package updated
Log message:
gleam: update to version 0.27.0

ChangeLog (taken from https://gleam.run/news/v0.27-hello-panic-goodbye-try/):

Gleam is a type safe and scalable language for the Erlang virtual machine and \ 
JavaScript runtimes. Today Gleam v0.27.0 has been released, let’s take a look \ 
at what’s new.
Using patterns in use expressions

The Gleam v0.25 release introduced the use expression, a feature that helps \ 
avoid “callback hell” in Gleam programs. It is quite powerful and can be \ 
used to emulate many features found in other languages such as early returns, \ 
list comprehensions, async/await, monadic do syntax, and more!

pub fn handle(req: Request) -> Response {
  // Return an error for non-post requests
  use <- when(req.method != Post, return: method_not_allowed)

  // Parse the request body or return an error
  use json <- require_json_body(req)

  // Open a database connection, closing it when we're done
  use conn <- database.with_connection

  case database.insert(conn, json) {
    Ok(record) -> created_response(record)
    Error(err) -> bad_request_response(err)
  }
}

One limitation of the use expression was that patterns could not be used with \ 
their assignments, only bare variables. This means you could not destructure a \ 
tuple or other data structure with them.

As of this release patterns are now supported in the use expression, for all \ 
your destructuring needs!

use #(first, second) <- some_tuple_function()

Don’t Panic!

This release introduces the panic keyword, a simple little keyword that causes \ 
the program to crash. Why would you want to do this?

Your program may not have sufficiently constrainted types to make invalid state \ 
unrepresentable. In this case you may want to use panic to crash the program \ 
when an invalid state is reached, which is often preferable than silently \ 
continuing or programming defensively.

Alternatively you may be embracing the Erlang philosophy of “let it crash” \ 
and choosing to use handle unexpected exceptional errors with an Erlang style \ 
supervision tree. This strategy is particularly effective when rapidly \ 
prototyping or in situations where there is no way to reasonably recover from an \ 
error, or client to show an error message to.

case this_should_never_fail() {
  Ok(value) -> continue(value)

  // Oh no! Something went horribly wrong!
  Error(_) -> panic
}

Panic is similar to the assert keyword, only it always crashes rather than \ 
conditionally. Speaking of the assert keyword…
Towards a better assert

Gleam’s assert keyword is used to ensure that data matches a given pattern, \ 
crashing the program if it does not. This is useful, but using assert for this \ 
functionality means that we can’t have an assert feature that works with \ 
boolean expressions, as is commonly found in other languages.

To remedy this the pattern matching feature has been moved to this let assert \ 
syntax. The existing assert keyword has been deprecated and will later be used \ 
for a more conventional assertion feature, to be part of a larger Gleam \ 
milestone based around improving the ergonomics of testing Gleam code.

let assert Ok(value) = this_should_never_fail()

Deprecations are annoying, and nobody likes having to fix their code, so the \ 
Gleam tooling will automatically upgrade your syntax when you run gleam format \ 
or format the code in your editor.
Moving beyond try

try expressions were introduced way back in v0.9 as a way of avoiding callback \ 
hell when working with functions that can either return a value or an error. Now \ 
that we have use expressions, the less general try expressions are redundant. We \ 
always prefer to have fewer ways to do the same thing in Gleam, and fewer things \ 
to have to learn, so try expressions are deprecated in this release.

A try expression can be replaced by a use expression with the then function from \ 
the gleam/result module. Once try is no longer a keyword the then function will \ 
be aliased to try.

// With try
try file = open_file()

// With use
use file <- then(open_file())

// After `try` is removed
use file <- try(open_file())

This is still annoying to fix by hand, so the new gleam fix command has been \ 
created to automatically upgrade your code for you.

And that’s it! There’s also lots of other small improvements and bug fixes, \ 
so check the full release notes for more details.

Thanks

Gleam is made possible by the support of all the kind people and companies who \ 
have very generously sponsored or contributed to the project. Thank you all!

If you like Gleam consider sponsoring or asking your employer to sponsor Gleam \ 
development. I work full time on Gleam and your kind sponsorship is how I pay my \ 
bills!

    Fly
   2023-01-19 20:26:55 by Nikita | Files touched by this commit (3) | Package updated
Log message:
gleam: update to version 0.26

ChangeLog taken from https://gleam.run/news/v0.26-incremental-compilation-and-deno/
Incremental compilation, and hello Deno!

Gleam v0.26 released

Incremental compilation

A Gleam project is made of packages, typically a top level package and several
dependency packages fetched by the package manager, and each package contains
a collection of modules of Gleam code.

In the very early days of Gleam when the compiler was run it would compile from
scratch every module in every package in the project. This was highly wasteful,
especially for the dependency packages which are would not have changed at all.
To tackle this inefficiency when the Gleam build tool was created it was made
to compile dependency packages only once and reuse the compiled code for every
following build, resulting in only the top level package being recompiled.

This has worked well for the last couple years, but now as more people are
using Gleam it was time for an upgrade. Large projects such as those with a
large amount of generated gRPC code were starting to take an irksome amount of
time to compile. Gleam is all about fun and productivity, so this just won't do!

There are numerous ways we want to improve the performance of the (already
very nimble) Gleam compiler, but the majority of the time is spent in the Erlang
compiler, which we use to generate BEAM bytecode, so these improvements will not
be very impactful here. Instead we need to improve the build tool such that it
only compiles modules when it has to, rather than the entire package.

To benchmark the impact of this change I created a Gleam package with 300,000
lines of code and 370,000 lines of documentation comments across 1400 modules,
and test recompiling the package without any changes. The old version of the
compiler will recompile every module, while the new version will instead only
read and verify the caches.
Erlang

Benchmark 1: v0.25
  Time (mean ± σ):     18.443 s ±  0.949 s    [User: 18.458 s, System: 2.995 s]
  Range (min … max):   17.102 s … 19.968 s    10 runs

Benchmark 2: v0.26
  Time (mean ± σ):     140.8 ms ±   3.9 ms    [User: 92.5 ms, System: 46.4 ms]
  Range (min … max):   138.0 ms … 156.1 ms    20 runs

Summary
  'v0.26' ran
  130.99 ± 7.67 times faster than 'v0.25'

When targeting Erlang rebuilding now 130 times faster than before for a
project this size!
JavaScript

Benchmark 1: v0.25
  Time (mean ± σ):      1.861 s ±  0.026 s    [User: 1.543 s, System: 0.299 s]
  Range (min … max):    1.833 s …  1.927 s    10 runs

Benchmark 2: v0.26
  Time (mean ± σ):     145.3 ms ±   2.9 ms    [User: 92.9 ms, System: 50.8 ms]
  Range (min … max):   141.4 ms … 154.3 ms    20 runs

Summary
  'v0.26' ran
   12.81 ± 0.31 times faster than 'v0.25'

When targeting JavaScript the change is less impactful, running just under 13
times faster. This is because on this target we don't need to run the Erlang
compiler to generate bytecode, the outputted JavaScript code can be loaded
directly into a JavaScript runtime.

These benchmarks were performed with the excellent Hypefine command line
benchmarking tool.
How does it work?

When the compiler runs for each module it emits a set of reusable artefacts:

    Erlang bytecode in a .beam file.
    Erlang record definitions in .hrl files for use by any native Erlang modules.
    Information on the types and values in the module in a .cache file.
    Information the compilation of the module in a .cache_meta file.

If the module doesn't need to be compiled again then we can load the .beam
bytecode into the virtual machine, load the module information from the .cache
file so we can compile other modules that depend on it, and move on to the next
module.

How do we tell if a module needs to be recomplied? There are two checks we need
to make, both using information stored in the .cache_meta file.

The first is to check the modification time of the source file against the
compile time stored in the .cache_meta file. If the source file modification
time is newer then it has been changed and we need to recompile it.

The second is to look at the modules dependencies. The .cache_meta file stores
a list of the modules the the module imports, and using this we can tell if any
of modules upstream in the dependency tree are going to be recompiled. If so
then we need to recompile the module as a change in a dependency may mean that
this module needs to be compiled differently than last time.

What's next?

These changes have made a huge difference to compilation speed, but there's
still a lot more easy wins we can apply in future here if the need arises such
as improvements to the efficiency of the compiler's IRs, more precise cache
invalidation, and multithreaded compilation.

Developer experience is a top priority for Gleam. You need your feedback as
quickly as possible when writing Gleam code, so we're committed to keeping the
compiler super speedy.

Running on Deno

Gleam can run on JavaScript as well as the Erlang virtual machine. Until now
when you run gleam run or gleam test with a Gleam project targeting JavaScript
it'll run your code using the NodeJS runtime. With v0.26 the Deno runtime can
be used instead!

Deno is similar to NodeJS in many ways, but it boasts better compliance with
web-standard APIs, much better security, and a very slick developer experience.

To use Deno instead of NodeJS you can either add the --runtime=deno flag to
commands like gleam run, or you can add the javascript.runtime property to your
gleam.toml file.

name = "my_project"
version = "1.0.0"

[javascript]
runtime = "deno"

Thank you to Brett Kolodny for this feature!
Thanks

Gleam is made possible by the support of all the kind people and companies who
have very generously sponsored or contributed to the project. Thank you all!

If you like Gleam consider sponsoring or asking your employer to sponsor Gleam
development. I work full time on Gleam and your kind sponsorship is how I pay
my bills!
   2023-01-17 19:22:32 by Nikita | Files touched by this commit (2)
Log message:
gleam: Update to version 0.25.3

Changelog
v0.25.3 - 2022-12-16

    4 digit integers are no longer automatically formatted with underscores.

v0.25.2 - 2022-12-16

    Updated actions/checkout from actions/checkout@v3.0.0 to @v3.2.0 for
    projects created via gleam new.
    Fixed a bug where gleam new would set a Rebar3 version to 25.1 instead of
    the latest stable 3.
    Updated following runtime versions set via gleam new: Erlang/OTP to 25.2,
    and Elixir to 1.14.2.
    The formatter now inserts underscores into larger Ints and the larger
    integer parts of Floats.
    Added support for top level TypeScript file inclusion in builds.
    The build tool will now favour using rebar3 over Mix for packages that
    support both. This fixes an issue where some packages could not be compiled
    without Elixir installed even though it is not strictly required.

v0.25.1 - 2022-12-11

    New Gleam projects are now configured to explicitly install rebar3 using
    GitHub actions erlef/setup-beam.
    A better error message is now shown when attempting to use a function
    within a constant expression.
    Changed float size limit in bitstring expressions to 16, 32 or 64, when
    static. Also allowed dynamic size.
    New Gleam projects are created using GitHub actions
    erlef/setup-beam@v1.15.0.
    Fixed a bug where returning an anonymous function from a pipeline an
    dcalling it immediately without assigning it to a variable would produce
    invalid Erlang code.
    Fixed a bug where the formatter would remove the braces from negating
    boolean expressions.

Next | Query returned 14 messages, browsing 1 to 10 | Previous