CLI Modifications
We have changed the following parts of the CLI (crate compiler-cli
):
new.rs
(glistix new
):- Added Nix-relevant file templates (
default.nix
,shell.nix
andflake.nix
); - Changed default
gleam.toml
to include Glistix-specific options.- It now patches
gleam_stdlib
toglistix_stdlib
by default on[glistix.preview.patch]
. - See more information at the configuration book page.
- It now patches
- Added Nix-relevant file templates (
run.rs
(glistix run
,glistix test
):- Use
nix-instantiate
when callingglistix run
orglistix test
on the Nix target.
- Use
publish.rs
(glistix publish
):- Uses
read_unpatched
to read configurations, thus using[dependencies]
as the published Hex dependencies, ignoring patches from[glistix.preview.patch]
.
- Uses
dependency.rs
(resolving versions for themanifest.toml
):- Implement features related to
[glistix.preview.patch]
, including detecting if patches changed before updating the manifest, ensuring local and Git dependencies specified through patches are provided and available, passing patch information to Hex dependency resolving, and storing patches in the manifest.
- Implement features related to
add.rs
:- Now has an additional dependency resolving step when the added package was affected by a patch (first, a version is resolved ignoring patches, generating the wrong manifest, and then we fix the manifest, keeping the initially resolved version in
[dependencies]
).
- Now has an additional dependency resolving step when the added package was affected by a patch (first, a version is resolved ignoring patches, generating the wrong manifest, and then we fix the manifest, keeping the initially resolved version in
config.rs
: Invokes patching when reading configuration files as necessary.
glistix build
(build.rs
) wasn't directly modified, but it now supports --target nix
as well.