mirror of
https://github.com/nushell/nushell.git
synced 2025-01-20 13:19:18 +01:00
49679741f7
97 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Piepmatz
|
3d5f853b03
|
Start to Add WASM Support Again (#14418)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> The [nushell/demo](https://github.com/nushell/demo) project successfully demonstrated running Nushell in the browser using WASM. However, the current version of Nushell cannot be easily built for the `wasm32-unknown-unknown` target, the default for `wasm-bindgen`. This PR introduces initial support for the `wasm32-unknown-unknown` target by disabling OS-dependent features such as filesystem access, IO, and platform/system-specific functionality. This separation is achieved using a new `os` feature in the following crates: - `nu-cmd-lang` - `nu-command` - `nu-engine` - `nu-protocol` The `os` feature includes all functionality that interacts with an operating system. It is enabled by default, but can be disabled using `--no-default-features`. All crates that depend on these core crates now use `--no-default-features` to allow compilation for WASM. To demonstrate compatibility, the following script builds all crates expected to work with WASM. Direct user interaction, running external commands, working with plugins, and features requiring `openssl` are out of scope for now due to their complexity or reliance on C libraries, which are difficult to compile and link in a WASM environment. ```nushell [ # compatible crates "nu-cmd-base", "nu-cmd-extra", "nu-cmd-lang", "nu-color-config", "nu-command", "nu-derive-value", "nu-engine", "nu-glob", "nu-json", "nu-parser", "nu-path", "nu-pretty-hex", "nu-protocol", "nu-std", "nu-system", "nu-table", "nu-term-grid", "nu-utils", "nuon" ] | each {cargo build -p $in --target wasm32-unknown-unknown --no-default-features} ``` ## Caveats This PR has a few caveats: 1. **`miette` and `terminal-size` Dependency Issue** `miette` depends on `terminal-size`, which uses `rustix` when the target is not Windows. However, `rustix` requires `std::os::unix`, which is unavailable in WASM. To address this, I opened a [PR](https://github.com/eminence/terminal-size/pull/68) for `terminal-size` to conditionally compile `rustix` only when the target is Unix. For now, the `Cargo.toml` includes patches to: - Use my forked version of `terminal-size`. - ~~Use an unreleased version of `miette` that depends on `terminal-size@0.4`.~~ These patches are temporary and can be removed once the upstream changes are merged and released. 2. **Test Output Adjustments** Due to the slight bump in the `miette` version, one test required adjustments to accommodate minor formatting changes in the error output, such as shifted newlines. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> This shouldn't break anything but allows using some crates for targeting `wasm32-unknown-unknown` to revive the demo page eventually. # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` I did not add any extra tests, I just checked that compiling works, also when using the host target but unselecting the `os` feature. # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> ~~Breaking the wasm support can be easily done by adding some `use`s or by adding a new dependency, we should definitely add some CI that also at least builds against wasm to make sure that building for it keep working.~~ I added a job to build wasm. --------- Co-authored-by: Ian Manske <ian.manske@pm.me> |
||
dependabot[bot]
|
a38663ec90
|
Bump actions-rust-lang/setup-rust-toolchain from 1.10.0 to 1.10.1 (#13979)
Bumps
[actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain)
from 1.10.0 to 1.10.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's
releases</a>.</em></p>
<blockquote>
<h2>v1.10.1</h2>
<ul>
<li>Fix problem matcher for rustfmt output.
The format has changed since <a
href="https://redirect.github.com/rust-lang/rustfmt/pull/5971">rust-lang/rustfmt#5971</a>
and now follows the form "filename:line".
Thanks to <a
href="https://github.com/0xcypher02"><code>@0xcypher02</code></a> for
pointing out the problem.</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.10.1">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.10.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's
changelog</a>.</em></p>
<blockquote>
<h2>[1.10.1] - 2024-10-01</h2>
<ul>
<li>Fix problem matcher for rustfmt output.
The format has changed since <a
href="https://redirect.github.com/rust-lang/rustfmt/pull/5971">rust-lang/rustfmt#5971</a>
and now follows the form "filename:line".
Thanks to <a
href="https://github.com/0xcypher02"><code>@0xcypher02</code></a> for
pointing out the problem.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="
|
||
dependabot[bot]
|
71d604067a
|
Bump actions-rust-lang/setup-rust-toolchain from 1.9.0 to 1.10.0 (#13922)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.9.0 to 1.10.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.10.0</h2> <h2>What's Changed</h2> <ul> <li>Add new parameter cache-directories that is propagated to Swatinem/rust-cache (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/44">#44</a> by <a href="https://github.com/pranc1ngpegasus"><code>@pranc1ngpegasus</code></a>)</li> <li>Add new parameter cache-key that is propagated to Swatinem/rust-cache as key (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/41">#41</a> by <a href="https://github.com/iainlane"><code>@iainlane</code></a>)</li> <li>Make rustup toolchain installation more robust in light of planned changes <a href="https://redirect.github.com/rust-lang/rustup/issues/3635">rust-lang/rustup#3635</a> and <a href="https://redirect.github.com/rust-lang/rustup/pull/3985">rust-lang/rustup#3985</a></li> <li>Allow installing multiple Rust toolchains by specifying multiple versions in the toolchain input parameter.</li> <li>Configure the rustup override behavior via the new override input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/38">#38</a>)</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/pranc1ngpegasus"><code>@pranc1ngpegasus</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/44">actions-rust-lang/setup-rust-toolchain#44</a></li> <li><a href="https://github.com/iainlane"><code>@iainlane</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/41">actions-rust-lang/setup-rust-toolchain#41</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.10.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.10.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <p>All notable changes to this project will be documented in this file.</p> <p>The format is based on <a href="https://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>, and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p> <h2>[Unreleased]</h2> <ul> <li>Add new parameter <code>cache-directories</code> that is propagated to <code>Swatinem/rust-cache</code> (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/44">#44</a> by <a href="https://github.com/pranc1ngpegasus"><code>@pranc1ngpegasus</code></a>)</li> <li>Add new parameter <code>cache-key</code> that is propagated to <code>Swatinem/rust-cache</code> as <code>key</code> (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/41">#41</a> by <a href="https://github.com/iainlane"><code>@iainlane</code></a>)</li> <li>Make rustup toolchain installation more robust in light of planned changes <a href="https://redirect.github.com/rust-lang/rustup/issues/3635">rust-lang/rustup#3635</a> and <a href="https://redirect.github.com/rust-lang/rustup/pull/3985">rust-lang/rustup#3985</a></li> <li>Allow installing multiple Rust toolchains by specifying multiple versions in the <code>toolchain</code> input parameter.</li> <li>Configure the <code>rustup override</code> behavior via the new <code>override</code> input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/38">#38</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Stefan Holderbach
|
2c379cba71
|
Remove system-clipboard from the default build (#13694)
# Description This feature tried to connect reedline with the system clipboard for three special bindings. To do so it uses the `arboard` crate with heavy dependencies for the system X or Wayland server or the Windows APIs. We had issues in the headless CI with it and builds with musl seem to stall. Removing it from the default build should negatively impact only a small subset of users aware of the extra bindings. You can still use the internal clipboard for binding based selection and the terminals extra bindings to copy arbitrary content into the system clipboard. For all other users it removes potential sources of failure and a whole 1 MB of release mode binary size (> 2% reduction). Furthermore a potentially substantial attack surface for Nushell is gone for default builds. - Should resolve #13019 - Work in the spirit of #13603 # User-Facing Changes The `edit` entries `copyselectionsystem`/`copyselectionsystem`/`pastesystem` for keybindings are gone in the default build If you strictly depend on this behavior, you can still build with the addition of `--features system-clipboard` |
||
dependabot[bot]
|
bb6cb94e55
|
Bump actions/checkout from 4.1.6 to 4.1.7 (#13177)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v4.1.7</h2> <h2>What's Changed</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/orhantoy"><code>@orhantoy</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.6...v4.1.7">https://github.com/actions/checkout/compare/v4.1.6...v4.1.7</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h2>v4.1.7</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
63c863c81b
|
Bump actions-rust-lang/setup-rust-toolchain from 1.8.0 to 1.9.0 (#13132)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.8.0 to 1.9.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.9.0</h2> <ul> <li>Add extra argument <code>cache-on-failure</code> and forward it to <code>Swatinem/rust-cache</code>. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/39">#39</a> by <a href="https://github.com/samuelhnrq"><code>@samuelhnrq</code></a>)<br /> Set the default the value to true. This will result in more caching than previously. This helps when large dependencies are compiled only for testing to fail.</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.9.0] - 2024-06-08</h2> <ul> <li>Add extra argument <code>cache-on-failure</code> and forward it to <code>Swatinem/rust-cache</code>. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/39">#39</a> by <a href="https://github.com/samuelhnrq"><code>@samuelhnrq</code></a>)<br /> Set the default the value to true. This will result in more caching than previously. This helps when large dependencies are compiled only for testing to fail.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
3cf150727c
|
Bump actions/checkout from 4.1.5 to 4.1.6 (#12934)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.1.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v4.1.6</h2> <h2>What's Changed</h2> <ul> <li>Check platform to set archive extension appropriately by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li> <li>Update for 4.1.6 release by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1733">actions/checkout#1733</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.5...v4.1.6">https://github.com/actions/checkout/compare/v4.1.5...v4.1.6</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h2>v4.1.6</h2> <ul> <li>Check platform to set archive extension appropriately by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Ian Manske
|
905e3d0715
|
Remove dataframes crate and feature (#12889)
# Description Removes the old `nu-cmd-dataframe` crate in favor of the polars plugin. As such, this PR also removes the `dataframe` feature, related CI, and full releases of nushell. |
||
dependabot[bot]
|
cad22bb833
|
Bump actions/checkout from 4.1.4 to 4.1.5 (#12804)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v4.1.5</h2> <h2>What's Changed</h2> <ul> <li>Update NPM dependencies by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li> <li>Bump github/codeql-action from 2 to 3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li> <li>Bump actions/setup-node from 1 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li> <li>Bump actions/upload-artifact from 2 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li> <li>README: Suggest <code>user.email</code> to be <code>41898282+github-actions[bot]@users.noreply.github.com</code> by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1707">actions/checkout#1707</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.4...v4.1.5">https://github.com/actions/checkout/compare/v4.1.4...v4.1.5</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Viktor Szépe
|
8eefb7313e
|
Minimize future false positive typos (#12751)
# Description
Make typos config more strict: ignore false positives where they occur.
1. Ignore only files with typos
2. Add regexp-s with context
3. Ignore variable names only in Rust code
4. Ignore only 1 "identifier"
5. Check dot files
🎁 Extra bonus: fix typos!!
|
||
dependabot[bot]
|
cb6d495e02
|
Bump actions/checkout from 4.1.3 to 4.1.4 (#12712)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.3 to 4.1.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v4.1.4</h2> <h2>What's Changed</h2> <ul> <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li> <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li> <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li> <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.3...v4.1.4">https://github.com/actions/checkout/compare/v4.1.3...v4.1.4</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h2>v4.1.4</h2> <ul> <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li> <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li> <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li> <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
1633004643
|
Bump actions/checkout from 4.1.2 to 4.1.3 (#12635) | ||
Devyn Cairns
|
13160b3ec3
|
Replace subtraction of Instants and Durations with saturating subtractions (#12549)
# Description Duration can not be negative, and an underflow causes a panic. This should fix #12539 as from what I can tell that bug was caused in `nu-explore:📟:events` from subtracting durations, but I figured this might be more widespread, and saturating to zero generally makes sense. I also added the relevant clippy lint to try to prevent this from happening in the future. I can't think of a reason we would ever want to subtract durations without checking first. cc @fdncred # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` |
||
Stefan Holderbach
|
3a11b9d69d
|
Also use old mac workers for plugins job (#12495)
Repeat from #12493 Now we see failures on main |
||
Devyn Cairns
|
cd8f04041c
|
Switch the CI to use macos-13 instead of macos-latest, due to failures (#12493)
# Description The CI has been failing lately on macOS, most likely because it's running out of memory now that the `polars` plugin has been included and it's quite large on top of `dfr`. This PR just makes use use the `macos-13` runner instead of `macos-latest` because the latter has only half as much RAM because it's running on the Apple M1 platform. --------- Co-authored-by: sholderbach <sholderbach@users.noreply.github.com> |
||
Stefan Holderbach
|
9a2a6ab52c
|
Update MSRV following rust-toolchain.toml (#12455)
Also update the `rust-version` in `Cargo.toml` following the update to `rust-toolchain.toml` in #12258 # Testing Added a CI check to verify any future PRs trying to update one will also have to update the other. (using `std-lib-and-python-virtualenv` job as this already includes a fresh `nu` binary for a little toml munching script) |
||
Ian Manske
|
f8c1e3ac61
|
Cancel old CI runs on commit (#12298)
# Description Adds a `concurrency` section to the CI workflow to cancel old CI jobs when a new commit is pushed to the same branch/PR. |
||
dependabot[bot]
|
96b4b91b2d
|
Bump actions/checkout from 4.1.1 to 4.1.2 (#12192) | ||
Stefan Holderbach
|
8a250d2e08
|
Include benchmarks in the CI clippy run (#12165)
Make sure the benchmarks don't go out of date and are nice. |
||
Stefan Holderbach
|
067ceedf79
|
Remove feat extra and include in default (#12140)
# Description The intended effect of the `extra` feature has been undermined by introducing the full builds on our release pages and having more activity on some of the extra commands. To simplify the feature matrix let's get rid of it and focus our effort on truly either refining a command to well-specified behavior or discarding it entirely from the `nu` binary and moving it into plugins. ## Details - Remove `--features extra` from CI - Don't explicitly name `extra` in full build wf - Remove feature extra from build-help scripts - Update README in `nu-cmd-extra` - Remove feature `extra` - Fix previously dead `format pattern` tests - Relax signature of `to html` - Fix/ignore `html::test_no_color_flag` - Remove dead features from `version` - Refine `to html` type signature # User-Facing Changes The commands that were previously only available when building with `--features extra` will now be available to everyone. This increases the number of dependencies slightly but has a limited impact on the overall binary size. # Tests + Formatting Some tests that were left in `nu-command` during cratification were dead because the feature was not passed to `nu-command` and only to `nu-cmd-lang` for feature-flag mention in `version`. Those tests have now been either fixed or ignored in one case. # After Submitting There may be places in the documentation where we point to `--features extra` that will now be moot (apart from the generated command help) |
||
Justin Ma
|
af98b0219d
|
Upgrade actions/checkout and softprops/action-gh-release (#12135)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # Description 1. Upgrade actions/checkout 2. Upgrade softprops/action-gh-release@v2.0.1 to fix Node16 warnings here: https://github.com/nushell/nushell/actions/runs/8162649859 3. Display Archive contents for Windows release |
||
Antoine Stevan
|
ef1d70eb67
|
hide std testing (#11331)
follow-up to - https://github.com/nushell/nushell/pull/11151 > **Important** > land only between 0.89 and 0.90 # Description this PR hides the `std testing` module from the outside. - moves `nu-std/std/testing.nu` to `nu-std/testing.nu` - removes the module from the standard library list of modules to parse - fixes `toolkit.nu` and the CI # User-Facing Changes `std testing` won't be part of the standard library anymore. # Tests + Formatting # After Submitting |
||
Tastaturtaste
|
e7a4af14cd
|
Add shift + navigation functionality through reedline (#11535)
This PR should close #1171 # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> This PR introduces the capability to select text using the existing move.. `EditCommand`s of `reedline`. Those commands are extended with an optional parameter specifying if text should be selected while navigating. This enables a workflow familiar from a wide variety of text editors, where holding `shift` while navigating selects all text between the initial cursor position when pressing `shift` and the current cursor position. Before this PR can be merged the [sibling PR for reedline](https://github.com/nushell/reedline/pull/689) has to land first. # User-Facing Changes ## Additional `EditCommand`s 1. `SelectAll` 2. `CutSelection` 3. `CopySelection` ## New optional parameter on existing `EditCommand`s All `EditCommand`s of `EditType` `MoveCursor` have a new optional parameter named `select` of type `bool`. If this parameter is not set by a user it is treated as false, which corresponds to their behavior up to now. I am relatively new to `nushell` and as such may not know of existing behavior that might change through this PR. However, I believe there should be none. I come to this conclusion because 1. Existing commands are extended only with an *optional* additional parameter, users who currently use these EditCommands keep their existing behavior if they don't use it. 2. A few new commands are introduced which were previously not valid. 3. The default keybindings specified in `default_config.nu` are untouched. # Tests + Formatting Tests for the new optional parameter for the move commands are included to make sure that they truly are optional and an unused optional parameter conforms to the previous behavior. |
||
dependabot[bot]
|
42b03917fb
|
Bump actions-rust-lang/setup-rust-toolchain from 1.6.0 to 1.8.0 (#11539)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.6.0 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.8.0</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>v1.7.0</h2> <h2>What's Changed</h2> <ul> <li>Allow overriding the toolchain file by <a href="https://github.com/Twey"><code>@Twey</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li>ci: update checked rust-toolchain version by <a href="https://github.com/robjtede"><code>@robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> <li>Prepare 1.7.0 release by <a href="https://github.com/robjtede"><code>@robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/30">actions-rust-lang/setup-rust-toolchain#30</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Twey"><code>@Twey</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li><a href="https://github.com/robjtede"><code>@robjtede</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.8.0] - 2024-01-13</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>[1.7.0] - 2024-01-11</h2> <ul> <li>Allow overriding the toolchain file with explicit <code>toolchain</code> input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/26">#26</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Stefan Holderbach
|
b0b4c3dffd
|
Check for clean repo after tests (#11409)
Goal: detect problems like adressed by #11407 or missing `Cargo.lock` update early Try to fail when there is a non clear `git status` message |
||
dependabot[bot]
|
6ead98effb
|
Bump actions/setup-python from 4 to 5 (#11279)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/setup-python/releases">actions/setup-python's releases</a>.</em></p> <blockquote> <h2>v5.0.0</h2> <h2>What's Changed</h2> <p>In scope of this release, we update node version runtime from node16 to node20 (<a href="https://redirect.github.com/actions/setup-python/pull/772">actions/setup-python#772</a>). Besides, we update dependencies to the latest versions.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0">https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0</a></p> <h2>v4.8.0</h2> <h2>What's Changed</h2> <p>In scope of this release we added support for GraalPy (<a href="https://redirect.github.com/actions/setup-python/pull/694">actions/setup-python#694</a>). You can use this snippet to set up GraalPy:</p> <pre lang="yaml"><code>steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: 'graalpy-22.3' - run: python my_script.py </code></pre> <p>Besides, the release contains such changes as:</p> <ul> <li>Trim python version when reading from file by <a href="https://github.com/FerranPares"><code>@FerranPares</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/628">actions/setup-python#628</a></li> <li>Use non-deprecated versions in examples by <a href="https://github.com/jeffwidman"><code>@jeffwidman</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/724">actions/setup-python#724</a></li> <li>Change deprecation comment to past tense by <a href="https://github.com/jeffwidman"><code>@jeffwidman</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/723">actions/setup-python#723</a></li> <li>Bump <code>@babel/traverse</code> from 7.9.0 to 7.23.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/743">actions/setup-python#743</a></li> <li>advanced-usage.md: Encourage the use actions/checkout@v4 by <a href="https://github.com/cclauss"><code>@cclauss</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/729">actions/setup-python#729</a></li> <li>Examples now use checkout@v4 by <a href="https://github.com/simonw"><code>@simonw</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/738">actions/setup-python#738</a></li> <li>Update actions/checkout to v4 by <a href="https://github.com/dmitry-shibanov"><code>@dmitry-shibanov</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/761">actions/setup-python#761</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/FerranPares"><code>@FerranPares</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/628">actions/setup-python#628</a></li> <li><a href="https://github.com/timfel"><code>@timfel</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/694">actions/setup-python#694</a></li> <li><a href="https://github.com/jeffwidman"><code>@jeffwidman</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/724">actions/setup-python#724</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4...v4.8.0">https://github.com/actions/setup-python/compare/v4...v4.8.0</a></p> <h2>v4.7.1</h2> <h2>What's Changed</h2> <ul> <li>Bump word-wrap from 1.2.3 to 1.2.4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/702">actions/setup-python#702</a></li> <li>Add range validation for toml files by <a href="https://github.com/dmitry-shibanov"><code>@dmitry-shibanov</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/726">actions/setup-python#726</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4...v4.7.1">https://github.com/actions/setup-python/compare/v4...v4.7.1</a></p> <h2>v4.7.0</h2> <p>In scope of this release, the support for reading python version from pyproject.toml was added (<a href="https://redirect.github.com/actions/setup-python/pull/669">actions/setup-python#669</a>).</p> <pre lang="yaml"><code> - name: Setup Python uses: actions/setup-python@v4 </tr></table> </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
f8dc3421b0
|
Bump actions-rust-lang/setup-rust-toolchain from 1.5.0 to 1.6.0 (#11223)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.5.0 to 1.6.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.6.0] - 2023-12-04</h2> <h3>Added</h3> <ul> <li>Allow disabling problem matchers (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/27">#27</a>) This can be useful when having a matrix of jobs, that produce the same errors.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Eric Hodel
|
91920373b5
|
Match toolkit clippy settings to CI clippy settings (#10984)
# Description I've had a few PRs fail clippy in CI after they pass `toolkit check pr` because the clippy settings are different. This brings `toolkit.nu` into alignment with CI and leaves notes to prompt future synchronization. # User-Facing Changes N/A # Tests + Formatting `cargo` output elided: ``` ❯ toolkit check pr running `toolkit fmt` running `toolkit clippy` running `toolkit clippy` on tests running `toolkit clippy` on plugins running `toolkit test` running `toolkit test stdlib` - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` ``` # After Submitting N/A |
||
Stefan Holderbach
|
19d732f313
|
Clippy in tests (#10394)
Running `cargo clippy --workspace --tests` We should move that to CI as well |
||
dependabot[bot]
|
94fc33bbee
|
Bump actions/checkout from 3 to 4 (#10308) | ||
Skyler Hawthorne
|
9a4dad6ca1
|
Fix unit tests on Android (#10224)
# Description * The path to the binaries for tests is slightly incorrect. It is missing the build target when it is set with the `CARGO_BUILD_TARGET` environment variable. For example, when `CARGO_BUILD_TARGET` is set to `aarch64-linux-android`, the path to the `nu` binary is: `./target/aarch64-linux-android/debug/nu` rather than `./target/debug/nu` This is common on Termux since the default target that rustc detects can cause problems on some projects, such as [python's `cryptography` package](https://github.com/pyca/cryptography/issues/7248). This technically isn't a problem specific to Android, but is more likely to happen on Android due to the latter. * Additionally, the existing variable named `NUSHELL_CARGO_TARGET` is in fact the profile, not the build target, so this was renamed to `NUSHELL_CARGO_PROFILE`. This change is included because without the rename, the build system would be using `CARGO_BUILD_TARGET` for the build target and `NUSHELL_CARGO_TARGET` for the build profile, which is confusing. * `std path add` tests were missing `android` test # User-Facing Changes For those who would like to build nushell on Termux, the unit tests will pass now. |
||
Stefan Holderbach
|
43ceb3edec
|
Remove clippy global -A from CI (#10072)
# Description We allowed two default lints due to false positives. This should be locally addressed with explicit information what causes either a false positive or why a particular design choice in the code is made. # User-Facing Changes None # Tests + Formatting We should detect a few more things with clippy out of the box. If you encounter a false positive you will need to address it on a case by case basis. |
||
Jakub Žádník
|
10fc32e3ef
|
Simplify virtualenv testing (#10035)
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com> Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com> |
||
Antoine Stevan
|
667502e8da
|
refactor the CI (#9626)
# Description this PR is an attempt at making the main CI workflow a bit easier to read, understand and work with 🤞 ## changelog - remove the deprecated `nu-coverage` job which was taking place for nothing - remove useless comments, i.e. comments that just say the same thing as the line they comment, e.g. the previous `on.push` comment, and comments that can be explained with a `git blame` inside an IDE, e.g. the comment about removing `--profile ci` on the `cargo install` in the std job - rename `nu-fmt-clippy` and `nu-tests` to `fmt-clippy` and `tests` as we already know we are working with Nushell - rename the "*style*" to "*feature*" which is exactly what `default`, `dataframe` and `extra` are - remove the `strategy.matrix.rust: stable` key: i couldn't find any documentation for this and it's not used in the jobs => by default, the toolchain of `actions-rust-lang/setup-rust-toolchain@v1.5.0` is the stable one (see the [documentation](https://github.com/actions-rust-lang/setup-rust-toolchain#inputs)) - add a top-level `env` block with all the environment variables, e.g. `CLIPPY_OPTIONS`, to have them all in one place hope you'll like that 😇 🙏 # User-Facing Changes # Tests + Formatting this PR should not change the different jobs being run in PRs and on the `main` branch. # After Submitting |
||
Woohyun Lim
|
7926e4ab6d
|
Prevent rustflags build config from being ignored in ci workflows (#9513)
# Description Prevent `rustflags` build configuration from being ignored in github actions ci workflows. [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain/) used in ci workflows sets `RUSTFLAGS="-D warnings"` env variable by default. It has priority over some other sources of `rustflags` as described in [the cargo reference](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags). Nushell is using `target.x86_64-pc-windows-msvc.rustflags` to statically link MSVC runtime in windows platform, but this config is being ignored in ci workflows. By unsetting `RUSTFLAGS` env variable, `rustflags` build configurations will be properly used in ci workflows. I assume that this was the cause of the installer verification failures on the recent winget submission PRs. For more details, refer discussions in https://github.com/microsoft/winget-pkgs/pull/106977 and https://github.com/nushell/nushell/pull/9322#issuecomment-1602932971. # User-Facing Changes Pre-built releases for windows that are created by the release ci workflow will now contain statically linked MSVC runtime. # Tests + Formatting Confirmed successful installation in a windows sandbox instance, which was failing before. It also contains changes made in #9514. Release ci workflow: https://github.com/wolimst/nushell/actions/runs/5357440849 Installer: https://github.com/wolimst/nushell/releases/tag/0.81.0-test # After Submitting Need to check the installer verification result in a winget submission PR for the next release, if this PR gets merged. |
||
Michael Angerman
|
b5d43f1e20
|
add in the nu-cmd-extra tests to the CI (#9439)
See if the CI passes with the nu-cmd-extra tests... |
||
dependabot[bot]
|
58f255c0c7
|
Bump actions-rust-lang/setup-rust-toolchain from 1.4.4 to 1.5.0 (#9363)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.4.4 to 1.5.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.5.0</h2> <h2>What's Changed</h2> <ul> <li>Check that listed components and targets are installed even with a rust-toolchain file by <a href="https://github.com/jonasbb"><code>@jonasbb</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/19">actions-rust-lang/setup-rust-toolchain#19</a></li> <li>allow disabling RUSTFLAGS config by <a href="https://github.com/JeanMertz"><code>@JeanMertz</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/18">actions-rust-lang/setup-rust-toolchain#18</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/JeanMertz"><code>@JeanMertz</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/18">actions-rust-lang/setup-rust-toolchain#18</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.5.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.5.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.5.0] - 2023-05-29</h2> <h3>Added</h3> <ul> <li> <p>Support installing additional components and targets that are not listed in <code>rust-toolchain</code> (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/14">#14</a>) Before only the items listed in <code>rust-toolchain</code> were installed. Now all the items from the toolchain file are installed and then all the <code>target</code>s and <code>components</code> that are provided as action inputs. This allows installing extra tools only for CI or simplify testing special targets in CI.</p> </li> <li> <p>Allow skipping the creation of a <code>RUSTFLAGS</code> environment variable. Cargos logic for rustflags is complicated, and setting the <code>RUSTFLAGS</code> environment variable prevents other ways of working. Provide a new <code>rustflags</code> input, which controls the environment variable creation. If the value is set to the empty string, then <code>RUSTFLAGS</code> is not created.</p> <p>Pre-existing <code>RUSTFLAGS</code> variables are never modified by this extension.</p> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Yethal
|
0bdc362e13
|
std: refactor test-runner to no longer require tests to be exported (#9355)
# Description Test runner now performs following actions in order to run tests: * Module file is opened * Public function with random name is added to the source code, this function calls user-specified private function * Modified module file is saved under random name in $nu.temp-path * Modified module file is imported in subprocess, injected function is called by the test runner # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> * Test functions no longer need to be exported * test functions no longer need to reside in separate test_ files * setup and teardown renamed to before-each and after-each respectively * before-all and after-all functions added that run before all tests in given module. This matches the behavior of test runners used by other languages such as JUnit/TestNG or Mocha # Tests + Formatting # After Submitting --------- Co-authored-by: Kamil <skelly37@protonmail.com> Co-authored-by: amtoine <stevan.antoine@gmail.com> |
||
Antoine Stevan
|
234ba197d7
|
CI: disable nu-coverage (#9251)
appears the `nu-coverage` job of the CI has decided to go wild, marking a lot of runs with ❌, both in PRs and on the `main` branch 😱 this PR tries to mitigate the damage by disabling the pipeline. > **Note** > see [*Using conditions to control job execution*](https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution) |
||
Darren Schroeder
|
ffb9ab9eef
|
Update rust-toolchain.toml to 1.67.1 (#9012)
# Description This PR bumps the rust toolchain from 1.66.1 to 1.67.1 # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> |
||
Máté FARKAS
|
b2d7427d2d
|
Move unit test runner to standard library (#8850)
Move test runner to standard library. Originated from #8819 # After Submitting I'll update the documentation about testing: http://www.nushell.sh/book/testing.html --------- Co-authored-by: Mate Farkas <Mate.Farkas@oneidentity.com> |
||
Stefan Holderbach
|
ebdb7ac2d8
|
Run coverage immediately (#8876)
# Description Don't wait for the tests to pass to try running the coverage job. In theory that would save some wasted runs but waiting for it can also slow down the review if you want to inspect that a certain branch is covered by tests. # Tests + Formatting Coverage runs immediately and can also fail due to failing tests |
||
Stefan Holderbach
|
b9808c8598
|
Reenable CI coverage (#8867)
# Description
Let's see if we don't run out of disk space as quickly again
This reverts commit
|
||
Antoine Stevan
|
4a955d7e76
|
stdlib: refactor into a multi-module library (#8815) | ||
Antoine Stevan
|
5d8bedfbe4
|
stdlib: make the library a standalone crate (#8770)
# Description as we now have a prelude thanks to #8627, i'd like to work on the structure of the library 😋 and i think the first step is to make it a true standalone crate 😏 this PR - moves all the library from `crates/nu-utils/standard_library/` to `crates/nu-std/` - moves the `rust` loading code from `src/run.rs` to `crates/nu-std/src/lib.rs` |
||
JT
|
0e496f900d
|
Remove CI coverage until we can figure out why it's broken (#8677)
# Description The coverage testing on CI has been broken for at least a week. It looks like we might have to do some work, but for now, disabling it so we don't give bad stability info to contributors. # User-Facing Changes _(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)_ # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-utils/standard_library/tests.nu` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. |
||
Antoine Stevan
|
0567407f85
|
standard library: bring the tests into the main CI (#8525)
Should close one of the tasks in #8450. # Description > **Note** > in order of appearance in the global diff - |
||
dependabot[bot]
|
93e5d8edc9
|
Bump actions-rust-lang/setup-rust-toolchain from 1.4.3 to 1.4.4 (#8536) | ||
Stefan Holderbach
|
27d798270b
|
Pull bleeding edge virtualenv tests again (#8262)
We previously pulled just the latest tags to be not dependent on potentially breaking tests from virtualenvs development. Effectively reverts #7638 |
||
dependabot[bot]
|
a29da8c95b
|
Bump actions-rust-lang/setup-rust-toolchain from 1.4.2 to 1.4.3 (#8239)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.4.2 to 1.4.3. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.4.3] - 2023-02-21</h2> <h3>Fixed</h3> <ul> <li>Executing the action twice for different toolchains now no longer fails around unstable features <a href="https://github-redirect.dependabot.com/actions-rust-lang/setup-rust-toolchain/issues/12">#12</a>. If multiple toolchains are installed, the "CARGO_REGISTRIES_CRATES_IO_PROTOCOL" can be downgraded to "git" if any of the installed toolchains require it.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |