Releases: Glistix/glistix
v0.8.0
-
Base Gleam version: v1.8.1
-
Updated Glistix to Gleam v1.8.1 (#53).
- This release brings language server improvements, such as actions for renaming variables and generating function definitions, as well as the
gleam deps tree
command and bug fixes. - See the Gleam blog post for the full news: https://gleam.run/news/gleam-gets-rename-variable/
- This release brings language server improvements, such as actions for renaming variables and generating function definitions, as well as the
-
Function doc comments are now generated in the resulting Nix code. (#55)
- The generated format is compatible with Nix RFC 0145.
- As a consequence, starting with Nix 2.24, you can type
:doc glistix_function
innix repl
to view the doc comment for that function after importing it. - Note that any occurrences of
*/
in the doc comment are escaped as* /
due to syntactical restrictions in the RFC's doc comment format.
-
Glistix will now error at compile-time on invalid integer (signed 64-bit) or float (also 64 bits) literals on the Nix target. (#54)
- Previously, excessively large integers and floats would still be compiled to Nix, leading to syntactical errors later, which should have been compile-time errors.
v0.7.0
Please read the Glistix book for migration instructions: https://glistix.github.io/book/compiler/changelog/v0-7-0.html
-
Base Gleam version: v1.7.0
-
Updated Glistix to Gleam v1.7.0 (#39).
- Most notably, this brings support for Nix FFI files in subdirectories! This is a very important step for Glistix, as it allows, for example, gradual adoption of Gleam in an existing Nix config or codebase by interfacing with existing files.
- Other goodies include custom pattern matching errors, record variant deprecation, generate decoder code action (soon to be fully supported by Glistix when
glistix_stdlib
is updated), extract variable code action, and more. - See the Gleam blog post for the full news: https://gleam.run/news/improved-performance-and-publishing/
-
Dependency patching for Nix support has received great improvements! (#44 and #48)
-
Read "Migration instructions" at the Glistix book to upgrade existing Glistix projects.
-
There is a new
gleam.toml
section for Glistix projects:[glistix.preview.patch]
. -
This section has a similar syntax to the dependencies section, and is used to replace transitive dependencies with other packages, even if they have different names, such as forks adding Nix target compatibility.
-
For example, one can replace
gleam_stdlib
withglistix_stdlib
(now published on Hex) using the snippet below:[glistix.preview.patch] gleam_stdlib = { name = "glistix_stdlib", version = ">= 0.34.0, < 2.0.0" }
-
With that snippet, all packages in your dependencies which depend on
gleam_stdlib
will depend onglistix_stdlib
instead, thus gaining Nix target support (where possible). -
Please note that this setting only has an effect on top-level projects. Patches from dependencies are ignored, though they may have their own patches to be able to run unit tests, for example (so it's still useful for packages).
-
This setting effectively deprecates the existing
local-override
andhex-patch
options.local-override
can be achieved throughpatch
by patching an incompatible local package to the same local package your project is using, whereashex-patch
can be achieved by specifying the dependencies you want published to Hex in[dependencies]
and the dependencies you want to use when running your project in[glistix.preview.patch]
. After some time, it's likely those settings will be removed.
-
-
Glistix now uses a "patchset" model for fork maintenance, which should hopefully lead to faster and cleaner Gleam version bumps. (#42 and #43)
- This works by keeping a branch with all changes applied to the upstream Gleam codebase. A Gleam version bump then consists of rebasing those patches on top of the updated codebase, letting us know which patches are outdated and which patches need fixing, rather than relying solely on the maintainer's recollection of events.
-
Backported an upstream fix for publishing packages with native (
.nix
) files in subdirectories. (#46)- This ensures you can publish packages to Hex using the new feature of
.nix
files in subdirectories introduced in this update.
- This ensures you can publish packages to Hex using the new feature of
-
Some JS target fixes from Gleam v1.7.0 were ported to the Nix target as well. (#40)
- If you have a file named
file.gleam
and another namedfile.nix
, you will now receive an error as that is invalid. - Fixes a bug where string pattern matching nested in patterns would generate wrong Nix code.
- If you have a file named
v0.6.0
-
Base Gleam version: v1.6.3
-
Updated Glistix to Gleam v1.6.3 (#34 and #35).
- Remarkably for Docker container users, this release brings a new
scratch
container without anything installed other than the Glistix compiler, which is useful for Nix target users. - In addition, this release brings variant inference in pattern matching, allowing one to access and update fields specific to each matched type variant in a
case
expression, as well as more LSP code actions such as to add missing type annotations to a function. - You can read more in the official Gleam blog post here: https://gleam.run/news/context-aware-compilation/
- Remarkably for Docker container users, this release brings a new
v0.5.0
-
Base Gleam version: v1.5.1
-
You can now try Glistix in your browser! Check out the Glistix online playground at https://glistix.github.io/playground
- The new playground supports compiling Gleam to Nix and quickly sharing Gleam code compiled to Nix to the web.
- It only supports importing the Gleam standard library for now, at an older version (0.38), but there are plans to include more packages in the future, such as
glistix_nix
. - Huge thanks to the Gleam team for providing the base code for the playground!
- Read more at the dedicated book page, which you can find by clicking here.
-
Updated Glistix to Gleam v1.5.1 (#26 and #29).
- This release brings great improvements to diagnostics and to the LSP. For example, there is now support for completion of local variables and arguments in functions, as well as missing module imports and missing
case
clauses suggestions, which are all very welcome quality of life features. - In addition, you can now omit
:utf8
in BitArray segments, writing just<<"Hello">>
instead of<<"Hello":utf8>>
. - You can read more in the official Gleam blog post here: https://gleam.run/news/convenient-code-actions/
- This release brings great improvements to diagnostics and to the LSP. For example, there is now support for completion of local variables and arguments in functions, as well as missing module imports and missing
-
Glistix now supports being compiled to WASM through the
compiler-wasm
crate (#22).- The Glistix web files are now distributed on every release with the
-browser
suffix. - This was essential to have the playground work!
- The Glistix web files are now distributed on every release with the
-
Glistix now pins the Rust version it uses in its official flake through
fenix
, so you can compile Glistix from source using Nix more reliably (#25).
v0.4.0
-
Base Gleam version: v1.4.1
-
Updated Glistix to Gleam v1.4.1 (#15 and #19).
- This release adds label punning syntax (writing
function(data:)
instead offunction(data: data)
), adds support for the<>
(string concatenation) operator inconst
variables' definitions, as well as several language server improvements (listing document symbols, completion for record fields on access, signature help when calling functions, and so on). - The JavaScript target also received support for endianness (
little
andbig
) and signedness (signed
andunsigned
integers) options on bit arrays, as well as sized float options (32-bit and 64-bit) and pattern matching onutf8
bit arrays. These options are not yet supported on the Nix target (but will be on a future Glistix release). - The
gleam docs
(and thus the equivalentglistix docs
) command received support for--target
, allowing you to pick the target used to compile the project to retrieve docs for. This can be handy to generate Nix-specific docs withglistix docs --target nix
.
- This release adds label punning syntax (writing
v0.3.0
-
Base Gleam version: v1.3.2
-
Updated Glistix to Gleam v1.3.2 (#8, #11 and #12).
- This release improves LSP autocomplete, adds arithmetic operation support to case clause guards, adds version specifier support to
gleam add
, and brings several other improvements and bug fixes to the compiler. - A prebuilt Wasm binary, in order to use the compiler in the browser, has been added to releases.
- This release improves LSP autocomplete, adds arithmetic operation support to case clause guards, adds version specifier support to
-
Ported some fixes for the JavaScript target from Gleam 1.3 to the Nix target as well (#13).
- This fixes a miscompilation when using a record constructor alias in a constant (see gleam-lang/gleam#3294).
- A similar fix has been made to record constructor aliases in case clause guards as well (see gleam-lang/gleam#3447).
- This also adds a compile-time error when trying to use a non-byte-aligned bit array on the Nix target (which currently only supports byte-aligned bit arrays).
- Finally, this ensures
gleam.nix
(exported to the build folder and used to import the Nix prelude) isn't unnecessarily rewritten to avoid problems with watchers.
-
Added Nix target support to language tests in the compiler (#10).
- This change doesn't directly affect Glistix users, but adds some proper testing of Gleam's language features to the Nix target, improving the likelihood of bugs being caught in the Nix target implementation.
v0.2.0
- Updated Glistix to Gleam v1.2.1 (#1 and #3).
- This brings great improvements to the LSP, as well as many important bug fixes and improvements to diagnostics.
- Target
aarch64-unknown-linux-gnu
was added to CI.
- Ported some fixes for the JavaScript target from Gleam v1.2.0 to the Nix target as well (#2).
- This fixes a miscompilation when using a module alias in a guard clause (see gleam-lang/gleam#3045).
v0.1.0
Initial (beta) release of ✨ Glistix ❄️, a fork of the Gleam compiler which allows compiling Gleam to Nix.
Glistix v0.1.0 is based on Gleam v1.1.0, more specifically gleam-lang/gleam@a2180e7 .