1
1
mirror of https://github.com/tweag/nickel.git synced 2024-10-26 20:08:08 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Viktor Kleen
78e7a8814b
Rename and move workspace crates (#1399)
* Rename and move workspace crates

nickel-lang -> nickel-lang-cli in cli/
nickel-lang-lib -> nickel-lang-core in core/
nickel-lang-utilities -> nickel-lang-utils in utils/
nickel-repl -> nickel-repl in wasm-repl/

* Finish renaming in rust sources

* Update RELEASING.md

* Move to workspace dependencies

* Rename nickel-repl -> nickel-wasm-repl

* Update RELEASING.md

Co-authored-by: Taeer Bar-Yam <Radvendii@users.noreply.github.com>

* Address suggestions from code review

* Update HACKING.md

Co-authored-by: Yann Hamdaoui <yann.hamdaoui@tweag.io>

* Elaborate on the versioning scheme in RELEASING.md

---------

Co-authored-by: Taeer Bar-Yam <Radvendii@users.noreply.github.com>
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@tweag.io>
2023-06-26 16:58:40 +00:00
Viktor Kleen
3e03cc7909
Move the CLI into its own crate (#1351)
* 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>
2023-06-16 16:34:13 +00:00
Yann Hamdaoui
030c71eed7
Use long names for string and numbers
Rename the builtin `Num` and `Str` types to `Number` and `String`, and
use long names on a number of related functions and stdlib modules for
consistency. This is a breaking syntax change.
2023-03-08 16:36:13 +01:00
Andreas Deininger
0f192ea0ae Fixes typos 2023-02-02 11:20:09 +01:00
matthew healy
bff8451f7e
Add snapshot testing infrastructure (#1034)
* 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
2023-01-09 11:32:40 +01:00
matthew healy
8e3fcba0f1
Update HACKING.md to cover current testing practices (#1001) 2022-12-15 18:25:39 +01:00
Julien Debon
62128a642f
Migrate Nix build from import-cargo to Crane (#963)
* 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
2022-12-05 17:28:45 +01:00
matthew healy
b0119f149e
Restructure integration tests into a single crate (#954)
* Restructure integration tests into a single crate

This commit replaces our multi-crate integration test setup with a
single crate that contains all tests, inspired by [this
blog](https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html).

This has dual benefits:
1. it should reduce the amount of time tests take to compile, as we're
   only producing a single binary,
2. it should reduce the amount of time tests take to run, as cargo
   schedules individual test binaries to run sequentially whereas tests
   within a binary can run in parallel.

* Update test references in HACKING.md

* Add README explaining test structure
2022-11-30 11:26:29 +01:00
Yann Hamdaoui
fe6ff26b5b Fix markdown lint warnings for HACKING.md 2022-08-04 18:37:00 +02:00
Yann Hamdaoui
3064766333
Update documentation with simplified WASM build 2022-06-15 16:59:08 +02:00
Yann Hamdaoui
8c66cb96cd
Move dev setup instructions to a separate HACKING.md document 2022-04-11 13:35:24 +02:00