Skip to content

Commit

Permalink
compiler: add CLI modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Apr 22, 2024
1 parent 3d1b22e commit e9f7522
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
- [Glistix Architecture](./compiler/architecture/README.md)
- [General modifications](./compiler/architecture/general-modifications.md)
- [Nix Backend](./compiler/architecture/nix-backend.md)
- [CLI modifications]()
- [CLI modifications](./compiler/architecture/cli-modifications.md)
15 changes: 15 additions & 0 deletions src/compiler/architecture/cli-modifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CLI Modifications

We have changed the following parts of the CLI (crate `compiler-cli`):

1. `new.rs` (`glistix new`):
- Added Nix-relevant file templates (`default.nix`, `shell.nix` and `flake.nix`);
- Clone [`glistix/stdlib`](https://github.com/glistix/stdlib) to `externals/stdlib` as a Git submodule by default;
- Changed default `gleam.toml` to include Glistix-specific options.
2. `run.rs` (`glistix run`, `glistix test`):
- Use `nix-instantiate` when calling `glistix run` or `glistix test` on the Nix target.
3. `publish.rs` (`glistix publish`):
- Implement `[glistix.preview.hex-patch]` by replacing dependencies with what's specified in `hex-patch` right before publishing.
4. `dependency.rs` (resolving versions for the `manifest.toml`):
- Implement `local-overrides` from `[glistix.preview]` by replacing provided (local/Git) dependencies with what the root package specified for them, if overridden by the root.
5. `fs.rs`: Added Git operations used by `new.rs`.

0 comments on commit e9f7522

Please sign in to comment.