* Implement `nickel format` PoC as a topiary wrapper
Improve error reporting for `nickel format`
nix build with topiary
Use upstream topiary query export
* Pin wasm-bindgen version
* Disable `format` feature in nickelStatic for now
* Remove thiserror dependency and make tempfile optional
* Update Cargo.lock
* Disable `nickel format` by default
* Various updates to VSCode extension
Last fixes before publishing the VSCode extension on the VSCode market
place:
- rename the parent containing directory from client-extension to vscode-extension
- add a display name and a description
- update the README, add links to non-Nix installation method
- small fixes to the textmate Nickel grammar
* Update flake.nix after rename client-extension -> vscode-extension
* Improve the TextMate grammar, fix interpolation handling
* Fix highlighting in VSCode extension
* Fix typo in release-artifacts workflow
* Enable cachix substituter in release-artifacts workflow
So that we don't rebuild everything during release.
* Upload docker image to GHCR in release workflow
Also add labels recognised by GHCR to the image.
* Add Nickel formatting to pre-commit-hooks/CI
* Run topiary on examples
* Topiary formatter on stdlib
* Add exclude list for Nickel formatting
* Reformat internals.ncl after rebase
* Fetch the wasm-bindgen-cli version from Cargo.lock instead of Cargo.toml
* Move the Nickel CLI to a separate crate
* Fix snapshot tests
* Rename the nickel flake output to nickel-lang-cli for consistency
* Move the nickel-lang crate into a subdirectory
* Update documentation for the new crate split
* Tweak snapshot test instructions
* Use project_root instead of ad-hoc environment variables
* Remove the library from nickel-lang-cli for now
* Rename nickel-lang to nickel-lang-lib and nickel-lang-cli to nickel-lang
* Apply suggestions from code review
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@tweag.io>
* Tweak documentation for nickel_lang_utilities::project_root
* Use MacOS 13 github runner because of https://github.com/cachix/install-nix-action/issues/183
---------
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@tweag.io>
* Make the trace destination configurable
* Add a callback-oriented trace collector to the wasm repl
* Only call back on flush
* Fix clippy
* Silence trace output in pyckel.
This probably isn't the best thing, but it's probably still better than
polluting stderr in a library. Possibly a better solution is to
imitate the api of `subprocess.run`, but that requires breaking API
to return something other than a plain string.
* Update regex crate to 1.7
We want to use the regex filtering feature of the insta snapshot testing
library. That has a dependency on a newer version of the regex crate
than Nickel currently does, so this commit updates the Nickel version to
a more recent compatible version.
* Add insta dependency
* Add cargo-insta to dev shells
* Add snapshot testing infrastructure
This uses the insta crate to implement snapshot testing.
Each snapshot test invokes the debug nickel binary with some set of
arguments, then captures the output & compares it to a file in the
snapshots directory
* Add nixpkgs-fmt to dev shell
This makes it possible to easily reformat flake.nix from within a dev
shell.
* Update HACKING.md
* Add snapshot testing README
* Refactor flake inputs because it's been annoying me for weeks now
* Fix a long-standing bug in mk_uniftype.rs
Can be reproduced by running `cargo test --workspace`.
This was never noticed before in CI because the `--workspace` flag is not passed.
This will be addressed in the Crane migration
* Remove utilities/Cargo.lock
This is probably a fragment of the past, back when Nickel did not use Cargo workspaces.
* Fix Clippy issues in tests
* Rustfmt and clippy are no longer in preview
* Update README with Nix flake shell command
* Migrate from import-cargo to crane for Nickel
Nickel WASM build is intentionally left intact and still uses the old
import-cargo.
This is because the change is already massive, and in practice the WASM build
relies more on `wasm-pack` than Cargo (even though under the hood, `wasm-pack`
uses Cargo).
If Crane looks good, both for DX and for CI, we will consider migrating Nickel
WASM to Crane too in a future PR.
* Remove support for Rust nightly channel
* Only Nix check for Rust `stable` channel
* Fix deprecated Nix build documentation commands
* Fix completion test
* Fix VS Code extension Nix build
* Regenerate the 3 `node2nix` files with a more recent `node2nix`
* Add the missing `vsce` dependency
* Pass the `--development` flag to `node2nix` to correctly include dev
dependencies like `typescript` or `vsce`
* Use the verbose form of `tsc` parameters in `package.json`
* Add `node2nix`, `markdownlint` and `nodejs` to the dev shell
* Add a `README.md` to the VS Code extension directory
Close https://github.com/tweag/nickel/issues/893
Version 0.2.74 no longer builds with recent `nixpkgs` because of openssl.
* Update wasm-bindgen from 0.2.74 to 0.2.83
* Refactor `wasm-bindgen-cli` overlay to override Nixpkgs' definition, rather
than build the package from Github
* Remove the no longer used `wasm-bindgen-api-Cargo.lock` file
* Add comments about the hidden coupling between `wasm-bindgen` in `Cargo.toml`
and `wasm-bindgen-cli` in `flake.nix`