mirror of
https://github.com/tweag/nickel.git
synced 2024-08-16 23:20:38 +03:00
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>
This commit is contained in:
parent
f895fb3c65
commit
78e7a8814b
131
Cargo.lock
generated
131
Cargo.lock
generated
@ -324,17 +324,6 @@ dependencies = [
|
||||
"half",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"textwrap 0.11.0",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "3.2.23"
|
||||
@ -344,7 +333,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"clap_lex 0.2.4",
|
||||
"indexmap",
|
||||
"textwrap 0.16.0",
|
||||
"textwrap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -519,32 +508,6 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"cast",
|
||||
"clap 2.34.0",
|
||||
"criterion-plot 0.4.5",
|
||||
"csv",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
"num-traits",
|
||||
"oorandom",
|
||||
"plotters",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_cbor",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tinytemplate",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.4.0"
|
||||
@ -556,7 +519,7 @@ dependencies = [
|
||||
"cast",
|
||||
"ciborium",
|
||||
"clap 3.2.23",
|
||||
"criterion-plot 0.5.0",
|
||||
"criterion-plot",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
"num-traits",
|
||||
@ -571,16 +534,6 @@ dependencies = [
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
|
||||
dependencies = [
|
||||
"cast",
|
||||
"itertools 0.10.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.5.0"
|
||||
@ -890,19 +843,6 @@ version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"humantime",
|
||||
"log",
|
||||
"regex",
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.10.0"
|
||||
@ -1360,12 +1300,16 @@ name = "lsp-harness"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"env_logger 0.10.0",
|
||||
"assert_cmd",
|
||||
"env_logger",
|
||||
"insta",
|
||||
"log",
|
||||
"lsp-server",
|
||||
"lsp-types",
|
||||
"nickel-lang-utils",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"test-generator",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1529,21 +1473,21 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nickel-lang"
|
||||
name = "nickel-lang-cli"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"clap 4.3.0",
|
||||
"directories",
|
||||
"insta",
|
||||
"nickel-lang-lib",
|
||||
"nickel-lang-utilities",
|
||||
"nickel-lang-core",
|
||||
"nickel-lang-utils",
|
||||
"serde",
|
||||
"test-generator",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nickel-lang-lib"
|
||||
version = "1.0.0"
|
||||
name = "nickel-lang-core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"assert_matches",
|
||||
@ -1551,7 +1495,7 @@ dependencies = [
|
||||
"codespan",
|
||||
"codespan-reporting",
|
||||
"comrak",
|
||||
"criterion 0.4.0",
|
||||
"criterion",
|
||||
"indexmap",
|
||||
"indoc 2.0.1",
|
||||
"js-sys",
|
||||
@ -1561,7 +1505,7 @@ dependencies = [
|
||||
"malachite",
|
||||
"malachite-q",
|
||||
"md-5",
|
||||
"nickel-lang-utilities",
|
||||
"nickel-lang-utils",
|
||||
"once_cell",
|
||||
"pprof",
|
||||
"pretty",
|
||||
@ -1601,7 +1545,7 @@ dependencies = [
|
||||
"codespan-reporting",
|
||||
"csv",
|
||||
"derive_more",
|
||||
"env_logger 0.9.3",
|
||||
"env_logger",
|
||||
"insta",
|
||||
"lalrpop",
|
||||
"lalrpop-util",
|
||||
@ -1610,8 +1554,8 @@ dependencies = [
|
||||
"lsp-harness",
|
||||
"lsp-server",
|
||||
"lsp-types",
|
||||
"nickel-lang-lib",
|
||||
"nickel-lang-utilities",
|
||||
"nickel-lang-core",
|
||||
"nickel-lang-utils",
|
||||
"pretty_assertions",
|
||||
"regex",
|
||||
"serde",
|
||||
@ -1620,21 +1564,21 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nickel-lang-utilities"
|
||||
version = "1.0.0"
|
||||
name = "nickel-lang-utils"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"codespan",
|
||||
"criterion 0.3.6",
|
||||
"nickel-lang-lib",
|
||||
"criterion",
|
||||
"nickel-lang-core",
|
||||
"serde",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nickel-repl"
|
||||
version = "1.0.0"
|
||||
name = "nickel-wasm-repl"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"nickel-lang-lib",
|
||||
"nickel-lang-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1852,7 +1796,7 @@ checksum = "196ded5d4be535690899a4631cc9f18cdc41b7ebf24a79400f46f48e49a11059"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"cfg-if",
|
||||
"criterion 0.4.0",
|
||||
"criterion",
|
||||
"findshlibs",
|
||||
"inferno",
|
||||
"libc",
|
||||
@ -1953,7 +1897,7 @@ name = "pyckel"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"codespan-reporting",
|
||||
"nickel-lang-lib",
|
||||
"nickel-lang-core",
|
||||
"pyo3",
|
||||
]
|
||||
|
||||
@ -2309,16 +2253,6 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_cbor"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
||||
dependencies = [
|
||||
"half",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.164"
|
||||
@ -2650,9 +2584,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "termimad"
|
||||
version = "0.23.0"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "749b18b17745261a883ab334d931adffc8c5e07e71c73a861e77124557e7b41f"
|
||||
checksum = "e7df2ed35b86d796df56633f1bb1f0c15816134e221822d65bbc64d5265ce8d4"
|
||||
dependencies = [
|
||||
"coolor",
|
||||
"crossbeam",
|
||||
@ -2690,15 +2624,6 @@ dependencies = [
|
||||
"syn 0.15.44",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.16.0"
|
||||
|
71
Cargo.toml
71
Cargo.toml
@ -1,11 +1,11 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"nickel-lang-lib",
|
||||
"nickel-lang-cli",
|
||||
"core",
|
||||
"cli",
|
||||
"lsp/nls",
|
||||
"lsp/lsp-harness",
|
||||
"utilities",
|
||||
"nickel-wasm-repl",
|
||||
"utils",
|
||||
"wasm-repl",
|
||||
"pyckel",
|
||||
]
|
||||
|
||||
@ -17,3 +17,66 @@ edition = "2021"
|
||||
keywords = ["configuration", "language", "nix", "nickel"]
|
||||
repository = "https://github.com/tweag/nickel"
|
||||
homepage = "https://nickel-lang.org"
|
||||
readme = "README.md"
|
||||
|
||||
[workspace.dependencies]
|
||||
nickel-lang-core = { version = "0.1", path = "./core", default-features = false }
|
||||
nickel-lang-utils = { version = "0.1", path = "./utils" }
|
||||
lsp-harness = { version = "0.1", path = "./lsp/lsp-harness" }
|
||||
|
||||
# The `wasm-bindgen` version is pinned (`=`) because it must be a version
|
||||
# available in Nixpkgs.
|
||||
wasm-bindgen = "=0.2.83"
|
||||
|
||||
ansi_term = "0.12"
|
||||
anyhow = "1.0"
|
||||
assert_cmd = "2.0.11"
|
||||
assert_matches = "1.5.0"
|
||||
clap = "4.3"
|
||||
codespan = "0.11"
|
||||
codespan-lsp = "0.11"
|
||||
codespan-reporting = "0.11"
|
||||
comrak = "0.17.0"
|
||||
criterion = "0.4"
|
||||
csv = "1"
|
||||
derive_more = "0.99"
|
||||
directories = "4.0.1"
|
||||
env_logger = "0.10"
|
||||
indexmap = "1.9.3"
|
||||
indoc = "2"
|
||||
insta = "1.29.0"
|
||||
js-sys = "0.3"
|
||||
lalrpop = "0.19.9"
|
||||
lalrpop-util = "0.19.9"
|
||||
lazy_static = "1"
|
||||
log = "0.4"
|
||||
logos = "0.12"
|
||||
lsp-server = "0.6"
|
||||
lsp-types = "0.88"
|
||||
malachite = "0.3.2"
|
||||
malachite-q = "0.3.2"
|
||||
md-5 = "0.10.5"
|
||||
once_cell = "1.17.1"
|
||||
pprof = "0.11.1"
|
||||
pretty = "0.11.3"
|
||||
pretty_assertions = "1.3.0"
|
||||
pyo3 = "0.17.3"
|
||||
regex = "1"
|
||||
rustyline = "11.0"
|
||||
rustyline-derive = "0.8.0"
|
||||
serde = "1.0.164"
|
||||
serde_json = "1.0.96"
|
||||
serde_repr = "0.1"
|
||||
serde-wasm-bindgen = "0.5.0"
|
||||
serde_yaml = "0.9.19"
|
||||
sha-1 = "0.10.0"
|
||||
sha2 = "0.10.6"
|
||||
similar = "2.2.1"
|
||||
simple-counter = "0.1.0"
|
||||
strip-ansi-escapes = "0.1.1"
|
||||
termimad = "0.23.1"
|
||||
test-generator = "0.3.1"
|
||||
toml = "0.7.2"
|
||||
typed-arena = "2.0.2"
|
||||
unicode-segmentation = "1.10.1"
|
||||
void = "1"
|
||||
|
40
HACKING.md
40
HACKING.md
@ -13,15 +13,21 @@ long.
|
||||
|
||||
## Content
|
||||
|
||||
The Nickel repository consist of 4 crates:
|
||||
The Nickel repository consist of various crates:
|
||||
|
||||
- `nickel-lang-lib` (path: `nickel-lang-lib`). The main crate containing the interpreter
|
||||
as a library.
|
||||
- `nickel-lang` (path: `nickel-lang-cli`). The `nickel` binary.
|
||||
- `nickel-lang-core` (path: `core`). The main crate containing the interpreter
|
||||
as a library.
|
||||
- `nickel-lang-cli` (path: `cli`). The `nickel` binary.
|
||||
- `nickel-lang-lsp` (path: `lsp/nls/`). The Nickel Language Server (NLS), an LSP
|
||||
server for Nickel.
|
||||
- `nickel-lang-utilities`: (path: `utilities/`). An auxiliary crate regrouping
|
||||
- `nickel-lang-utils`: (path: `utils/`). An auxiliary crate regrouping
|
||||
helpers for tests and benchmarks. Not required to build `nickel` itself.
|
||||
- `pyckel` (path: `pyckel`). Python bindings to `nickel-lang-core`.
|
||||
- `lsp-harness` (path: `lsp/lsp-harness`). A testing harness for the Nickel Language
|
||||
Server.
|
||||
- `nickel-repl` (path: `wasm-repl`). An auxiliary crate, re-exporting
|
||||
`nickel-lang-core` with the right settings for building a WASM repl. Primarily
|
||||
used on [nickel-lang.org].
|
||||
|
||||
Other noteworthy items:
|
||||
|
||||
@ -58,16 +64,16 @@ nickel-lang-lsp 0.1.0
|
||||
|
||||
### Nickel
|
||||
|
||||
To only build the main crate `nickel-lang-lib`, run:
|
||||
To only build the main crate `nickel-lang-core`, run:
|
||||
|
||||
```console
|
||||
cargo build -p nickel-lang-lib
|
||||
cargo build -p nickel-lang-core
|
||||
```
|
||||
|
||||
To build the interpreter CLI, run:
|
||||
|
||||
```shell
|
||||
$ cargo build -p nickel-lang
|
||||
$ cargo build -p nickel-lang-cli
|
||||
$ ./target/debug/nickel --version
|
||||
nickel-lang 0.1.0
|
||||
```
|
||||
@ -88,8 +94,8 @@ nickel-lang-lsp 0.1.0
|
||||
|
||||
There is a WebAssembly (WASM) version of the REPL, which is used for the online
|
||||
playground on [nickel-lang.org][nickel-lang.org]. To ease the build, we use the
|
||||
`nickel-repl` located in `nickel-wasm-repl`, which just wraps and re-export
|
||||
the `nickel-lang-lib` with the right settings for building to WebAssembly.
|
||||
`nickel-repl` located in `wasm-repl`, which just wraps and re-export
|
||||
the `nickel-lang-core` crate with the right settings for building to WebAssembly.
|
||||
|
||||
The Nix flake has also an output to do the whole build, but incremental
|
||||
compilation is not as good as with direct usage of `cargo`.
|
||||
@ -124,8 +130,8 @@ LICENSE package.json nickel_lang_bg.js nickel_lang_bg.wasm [..]
|
||||
Tests are run via `cargo test`. They are two types of tests:
|
||||
|
||||
- Unit tests, located directly in the corresponding module.
|
||||
- Integration tests, located in the dedicated crate `nickel-lang-lib/tests/integration`.
|
||||
- Snapshot tests, located in `nickel-lang-cli/tests/smapshot`.
|
||||
- Integration tests, located in the dedicated crate `core/tests/integration`.
|
||||
- Snapshot tests, located in `cli/tests/smapshot`.
|
||||
|
||||
### Test annotations
|
||||
|
||||
@ -136,27 +142,27 @@ to mark examples, in the top-level subdirectory `examples`, with an expected
|
||||
failure condition if necessary.
|
||||
|
||||
Tests for the happy path - i.e., valid Nickel programs which do not raise errors
|
||||
are generally written in standalone Nickel files in the `nickel-lang-lib/tests/integration/pass`
|
||||
are generally written in standalone Nickel files in the `core/tests/integration/pass`
|
||||
directory. All `.ncl` files in this directory are automatically converted into
|
||||
Rust integration tests, which run the file and assert that no errors were
|
||||
raised during evaluation.
|
||||
|
||||
Each of these `.ncl` files is structured as an array of `Bool` expressions, which
|
||||
is ultimately passed to a `check` function defined in
|
||||
`nickel-lang-lib/tests/integration/pass/lib/assert.ncl`.
|
||||
`core/tests/integration/pass/lib/assert.ncl`.
|
||||
This function applies an `Assert` contract to each value in the array, which
|
||||
checks that the value it is applied to evaluates to `true`. The benefit of using
|
||||
a contract for this is that if a test fails we can simply run the file directly
|
||||
using Nickel, which gives better error messages than the ones we get by default
|
||||
from `cargo test`.
|
||||
|
||||
Tests which are expected to fail may be written in Rust in `nickel-lang-lib/tests/integration`.
|
||||
Tests which are expected to fail may be written in Rust in `core/tests/integration`.
|
||||
However, simple failure test cases can make use of the test annotation support
|
||||
and are located in `nickel-lang-lib/tests/integration/fail`.
|
||||
and are located in `core/tests/integration/fail`.
|
||||
|
||||
### Snapshot testing
|
||||
|
||||
The project also contains a suite of snapshot tests in the `nickel-lang-cli/tests/snapshot`
|
||||
The project also contains a suite of snapshot tests in the `cli/tests/snapshot`
|
||||
directory. Here, `.ncl` files written in the subdirectories of the `input`
|
||||
directory are run against the last-built Nickel binary, and their output is
|
||||
compared to the last-known output.
|
||||
|
@ -77,7 +77,7 @@ Please follow the getting started guide for Nickel users on the [nickel-lang
|
||||
website](https://nickel-lang.org/getting-started). The instructions below are
|
||||
either reproduced for this document to be self-contained or because
|
||||
they are aimed toward hacking on the Nickel interpreter itself (e.g. building
|
||||
the `nickel-lang-lib` crate documentation).
|
||||
the `nickel-lang-core` crate documentation).
|
||||
|
||||
### Run
|
||||
|
||||
|
58
RELEASING.md
58
RELEASING.md
@ -7,35 +7,53 @@ crates and dependent repositories (such as the website) in a consistent state.
|
||||
|
||||
## Steps to make a release
|
||||
|
||||
### About the version numbers
|
||||
|
||||
Some of the crates in the Nickel workspace are libraries and not versioned
|
||||
according to the version number of the language itself. These are
|
||||
|
||||
- `nickel-lang-core`
|
||||
- `nickel-lang-utils`
|
||||
- `lsp-harness`
|
||||
- `nickel-wasm-repl`
|
||||
|
||||
Their version numbers take the form `0.W.U` and their public APIs are not
|
||||
considered stable. Consequently we bump their versions to `0.(W+1).0` on every
|
||||
release.
|
||||
|
||||
Other crates carry the version number of the Nickel language. These are
|
||||
|
||||
- `nickel-lang-cli`
|
||||
- `nickel-lang-lsp`
|
||||
- `pyckel`
|
||||
|
||||
### Prepare
|
||||
|
||||
1. Branch out from `master` to a dedicated branch `X.Y.Z-release`:
|
||||
`git checkout -b X.Y.Z-release`
|
||||
2. Bump the version number of all the crates of the workspace to `X.Y.Z`:
|
||||
- Bump the `version` attribute to `X.Y.Z` in `./Cargo.toml`,
|
||||
`./utilities/Cargo.toml`, `lsp/nls/Cargo.toml` and
|
||||
`./nickel-wasm-repl/Cargo.toml`.
|
||||
- Bump the version of the interdependencies of the crates in `nickel-lang-cli`,
|
||||
`nickel-lang-lib`, `lsp/nls` and `nickel-wasm-repl`. For example, `nickel-lang-lib`
|
||||
has the following line in `./nickel-lang-lib/Cargo.toml` under `[dev-dependencies]`:
|
||||
2. Bump the overall version number in `Cargo.toml` to `X.Y.Z`. This will be
|
||||
automatically propagated to the CLI, the Nickel language server and Pyckel.
|
||||
3. Bump the version number of the other crates in the workspace:
|
||||
- `core/Cargo.toml`
|
||||
- `lsp/lsp-harness/Cargo.toml`
|
||||
- `utils/Cargo.toml`
|
||||
- `wasm-repl/Cargo.toml`
|
||||
Afterwards, also adjust the version numbers in `Cargo.toml`. For example, in
|
||||
|
||||
```toml
|
||||
nickel-lang-utilities = {path = "../utilities", version = "0.3.0"}
|
||||
```
|
||||
```toml
|
||||
nickel-lang-core = { version = "0.1", path = "./core", default-features = false }
|
||||
```
|
||||
|
||||
You have to bump the `version` number to `X.Y.Z` of such dependencies on
|
||||
`nickel-lang-lib`, `nickel-lang-utilities`, or any other crate of the
|
||||
workspace as well.
|
||||
adjust the version `0.1` to reflect the new version number.
|
||||
|
||||
Commit and push your changes.
|
||||
3. Make sure that everything builds: run `nix flake check` at the root of the
|
||||
4. Make sure that everything builds: run `nix flake check` at the root of the
|
||||
repository.
|
||||
4. Add the changelog since the last release in RELEASES.md. GitHub is able to
|
||||
5. Add the changelog since the last release in RELEASES.md. GitHub is able to
|
||||
automatically generate release notes: refer to [this
|
||||
guide](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes).
|
||||
While the output needs to be reworked, it's a useful starting point. Commit
|
||||
and push your changes.
|
||||
5. Set the `stable` branch to point to your new `X.Y.Z-release`. Because the
|
||||
6. Set the `stable` branch to point to your new `X.Y.Z-release`. Because the
|
||||
`stable` branch usually contains specific fixes, or cherry-picked commits,
|
||||
we'll have to force push. We advise to first save the previous state in a
|
||||
local branch:
|
||||
@ -63,9 +81,9 @@ crates and dependent repositories (such as the website) in a consistent state.
|
||||
|
||||
### Release on crates.io
|
||||
|
||||
1. Remove references to `nickel-lang-utilities` from the `[dev-dependencies]`
|
||||
sections of the crates to be published: `./nickel-lang-lib/Cargo.toml` for
|
||||
`nickel-lang-lib`, `./nickel-lang-cli/Cargo.toml` for `nickel-lang-cli` and
|
||||
1. Remove references to `nickel-lang-utils` from the `[dev-dependencies]`
|
||||
sections of the crates to be published: `./core/Cargo.toml` for
|
||||
`nickel-lang-core`, `./cli/Cargo.toml` for `nickel-lang-cli` and
|
||||
`./lsp/nls/Cargo.toml` for `nickel-lang-lsp` (work-around for
|
||||
[cargo:#4242](https://github.com/rust-lang/cargo/issues/4242).
|
||||
|
||||
|
32
cli/Cargo.toml
Normal file
32
cli/Cargo.toml
Normal file
@ -0,0 +1,32 @@
|
||||
[package]
|
||||
name = "nickel-lang-cli"
|
||||
description = "The Nickel interpreter CLI"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "nickel"
|
||||
path = "bin/nickel.rs"
|
||||
bench = false
|
||||
|
||||
[features]
|
||||
default = ["repl", "doc"]
|
||||
repl = ["nickel-lang-core/repl"]
|
||||
doc = ["nickel-lang-core/doc"]
|
||||
|
||||
[dependencies]
|
||||
nickel-lang-core = { workspace = true, features = [ "markdown" ], default-features = false }
|
||||
|
||||
clap = { workspace = true, features = ["derive"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
directories.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
nickel-lang-utils.workspace = true
|
||||
test-generator.workspace = true
|
||||
insta = { workspace = true, features = ["filters"] }
|
@ -1,13 +1,13 @@
|
||||
//! Entry point of the program.
|
||||
use core::fmt;
|
||||
use nickel_lang_lib::error::{Error, IOError};
|
||||
use nickel_lang_lib::eval::cache::CacheImpl;
|
||||
use nickel_lang_lib::program::Program;
|
||||
use nickel_lang_lib::repl::query_print;
|
||||
use nickel_lang_core::error::{Error, IOError};
|
||||
use nickel_lang_core::eval::cache::CacheImpl;
|
||||
use nickel_lang_core::program::Program;
|
||||
use nickel_lang_core::repl::query_print;
|
||||
#[cfg(feature = "repl")]
|
||||
use nickel_lang_lib::repl::rustyline_frontend;
|
||||
use nickel_lang_lib::term::RichTerm;
|
||||
use nickel_lang_lib::{serialize, serialize::ExportFormat};
|
||||
use nickel_lang_core::repl::rustyline_frontend;
|
||||
use nickel_lang_core::term::RichTerm;
|
||||
use nickel_lang_core::{serialize, serialize::ExportFormat};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{
|
||||
fs::{self, File},
|
@ -1,4 +1,4 @@
|
||||
use nickel_lang_utilities::{
|
||||
use nickel_lang_utils::{
|
||||
annotated_test::{read_annotated_test_case, TestCase},
|
||||
project_root::project_root,
|
||||
};
|
||||
@ -24,7 +24,7 @@ macro_rules! assert_snapshot_filtered {
|
||||
}
|
||||
}
|
||||
|
||||
#[test_resources("nickel-lang-cli/tests/snapshot/inputs/*/*.ncl")]
|
||||
#[test_resources("cli/tests/snapshot/inputs/*/*.ncl")]
|
||||
fn check_snapshots(path: &str) {
|
||||
let file = TestFile::from_project_path(path);
|
||||
|
108
core/Cargo.toml
Normal file
108
core/Cargo.toml
Normal file
@ -0,0 +1,108 @@
|
||||
[package]
|
||||
name = "nickel-lang-core"
|
||||
version = "0.1.0"
|
||||
description = "Programmable configuration files."
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
|
||||
[features]
|
||||
default = ["markdown", "repl", "doc"]
|
||||
markdown = ["termimad"]
|
||||
repl = ["rustyline", "rustyline-derive", "ansi_term"]
|
||||
repl-wasm = ["wasm-bindgen", "js-sys", "serde_repr"]
|
||||
doc = ["comrak"]
|
||||
|
||||
[build-dependencies]
|
||||
lalrpop.workspace = true
|
||||
|
||||
[dependencies]
|
||||
lalrpop-util.workspace = true
|
||||
regex.workspace = true
|
||||
simple-counter.workspace = true
|
||||
clap = { workspace = true, features = ["derive"] }
|
||||
codespan.workspace = true
|
||||
codespan-reporting.workspace = true
|
||||
logos.workspace = true
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json.workspace = true
|
||||
serde_yaml.workspace = true
|
||||
toml = { workspace = true, features = ["parse"] }
|
||||
void.workspace = true
|
||||
sha-1.workspace = true
|
||||
sha2.workspace = true
|
||||
md-5.workspace = true
|
||||
unicode-segmentation.workspace = true
|
||||
indoc.workspace = true
|
||||
|
||||
termimad = { workspace = true, optional = true }
|
||||
ansi_term = { workspace = true, optional = true }
|
||||
|
||||
rustyline = { workspace = true, optional = true}
|
||||
rustyline-derive = { workspace = true, optional = true }
|
||||
|
||||
wasm-bindgen = { workspace = true, optional = true, features = ["serde-serialize"] }
|
||||
serde-wasm-bindgen.workspace = true
|
||||
js-sys = { workspace = true, optional = true }
|
||||
serde_repr = { workspace = true, optional = true }
|
||||
pretty.workspace = true
|
||||
|
||||
comrak = { workspace = true, optional = true, features = [] }
|
||||
once_cell.workspace = true
|
||||
typed-arena.workspace = true
|
||||
malachite = { workspace = true, features = ["enable_serde"] }
|
||||
malachite-q.workspace = true
|
||||
indexmap = { workspace = true, features = ["serde"] }
|
||||
strip-ansi-escapes.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions.workspace = true
|
||||
assert_matches.workspace = true
|
||||
criterion.workspace = true
|
||||
pprof = { workspace = true, features = ["criterion", "flamegraph"] }
|
||||
nickel-lang-utils.workspace = true
|
||||
similar.workspace = true
|
||||
test-generator.workspace = true
|
||||
|
||||
# Enable this to use flamegraphs
|
||||
# [profile.release]
|
||||
# debug = true
|
||||
|
||||
[[bench]]
|
||||
name = "numeric"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "functions"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "arrays"
|
||||
harness = false
|
||||
|
||||
# [[bench]]
|
||||
# name = "records"
|
||||
# harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "serialization"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "mantis"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "stdlib"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "typecheck-nixpkgs-lib"
|
||||
harness = false
|
@ -1,11 +1,11 @@
|
||||
use std::rc::Rc;
|
||||
|
||||
use criterion::{criterion_main, Criterion};
|
||||
use nickel_lang_lib::term::{
|
||||
use nickel_lang_core::term::{
|
||||
array::{Array, ArrayAttrs},
|
||||
Number, RichTerm, Term,
|
||||
};
|
||||
use nickel_lang_utilities::{bench::EvalMode, ncl_bench_group};
|
||||
use nickel_lang_utils::{bench::EvalMode, ncl_bench_group};
|
||||
use pprof::criterion::{Output, PProfProfiler};
|
||||
use pretty::{BoxAllocator, DocBuilder, Pretty};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user