3 Commits
Author SHA1 Message Date
Darren Schroeder 168db974ba Remove deprecations older than six months (#19382)
## Description

This removes everything deprecated in 0.112 or earlier (April 2026 or
before), along with the stubs left from the 2023 removals. It also
removes `ast::Call::positional_nth` and `positional_len`, which were
deprecated in 0.113 and have no in-tree users. Everything else
deprecated in 0.113 or later stays: `watch` with a closure, `str
upcase`/`str downcase`, `ShellError::Return`, `tui label --title`, and
`update cells --columns`.

Commands and flags are deleted outright instead of being turned into
stubs. Most removed names still lead to their replacement through
existing search terms: `filter` suggests `where`, `benchmark` suggests
`timeit`, `fetch` suggests `http get`, and `post` suggests `http post`.

`default $closure` keeps its current behavior. The deprecation warning
promised that closures passed by variable would become lazy, but making
that change would be a new break. So the promise goes away instead: a
closure literal (`default { ... }`) is evaluated lazily, and a closure
passed directly as `$var` is the default value itself. The help text now
says this.

`CustomValue::is_iterable()` is no longer deprecated. Its deprecation
note promised a replacement that was never built, and the SQLite query
builder still depends on it.

## User-facing changes (Release notes)

- Removed `--ignore-errors (-i)` from `get`, `select`, and `reject`. Use
`--optional (-o)`.
- Removed `get --sensitive (-s)`. Cell paths are case-sensitive by
default. Add `!` after a member to make it case-insensitive.
- Removed `filter`. Use `where`, which takes the same closures,
including one stored in a variable.
- Removed the `positional` option from custom completer results. Use
`completion_algorithm: substring` instead. A completer that still
returns `positional: false` now gets prefix matching.
- `default` no longer warns when its closure is passed directly as
`$var`. That closure is used as the default value, while a closure
literal is still evaluated lazily.
- Deleted the `date format` and `let-env` stubs and the removal hints
for `fetch`, `post`, and `benchmark`. All of these were removed in 2023.
`let-env FOO = 1` now fails with "Assignment operations require a
variable", and `date format '%Y'` with "Extra positional argument". Use
`$env.FOO = 1` and `format date`.
- Nushell no longer converts a pre-0.93 `plugin.nu` into
`plugin.msgpackz`. A setup that has only `plugin.nu` starts with no
plugins. Register them again with `plugin add`.

### Breaking changes for plugin authors

- `ShellError::GenericError` is removed. Use
`ShellError::Generic(GenericError)`.
- `PipelineData::metadata()` is removed. Use `metadata_ref()`,
`metadata_mut()`, or `take_metadata()`.
- `EngineState::current_work_dir()` and `StateWorkingSet::get_cwd()` are
removed. Use `EngineState::cwd()` or `cwd_as_string()`.
- `ast::Call::positional_nth()` and `positional_len()` are removed. Use
`positional_iter()`.
- The unused `ShellError::DeprecationWarning` is removed.
- `CustomValue::is_iterable()` is no longer deprecated.

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
2026-10-31 07:58:34 -05:00
Andy Gayton b27cd70fd1 remove the deprecated register command (#13297)
# Description

This PR removes the `register` command which has been
[deprecated](https://www.nushell.sh/blog/2024-04-30-nushell_0_93_0.html#register-toc)
in favor of [`plugin
add`](https://www.nushell.sh/blog/2024-04-30-nushell_0_93_0.html#redesigned-plugin-management-commands-toc)

# User-Facing Changes

`register` is no longer available
2024-07-05 07:16:50 -05:00
Antoine Stevan 8eece32a8d REFACTOR: clean the root of the repo (#9231)
# Description
i've almost always wanted to clean up the root of the repo, so here is
my take at it, with some important advice given by @fdncred 😌

- `README.release.txt` is now gone and directly inline in the
`release-pkg` script used in the `release` *workflow*
- `build.rs` has been moved to `scripts/` and its path has been changed
in
[`Cargo.toml`](https://github.com/amtoine/nushell/blob/refactor/clean-root/Cargo.toml#L3)
according to the [*Build Scripts*
section](https://doc.rust-lang.org/cargo/reference/build-scripts.html#build-scripts)
of *The Cargo Book*
- i've merged `images/` into `assets/` and fix the only mention to the
GIF in the README
- i've moved the `docs/README.md` inside the main `README.md` as a new
[*Configuration*
section](https://github.com/amtoine/nushell/tree/refactor/clean-root#configuration)
- the very deprecated `pkg_mgrs/` has been removed
- all the `.nu`, `.sh`, `.ps1` and `.cmd` scripts have been moved to
`scripts/`

### things i've left as-is
- all the other `.md` documents
- the configuration files
- all the Rust and core stuff
- `docker/`
- `toolkit.nu`
- the `wix/` diretory which appears to be important for `winget`

# User-Facing Changes
scripts that used to rely on the paths to some of the scripts should now
call the scripts inside `scripts/` => i think this for the greater good,
it was not pretty nor scalable to have a bunch of scripts in the root of
our main `nushell` 😱

*i even think we might want to move these scripts outside the main
`nushell` repo*
maybe to `nu_scripts` or some other tool 👍 

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- ⚫ `toolkit test`
- ⚫ `toolkit test stdlib`

# After Submitting
```
$nothing
```
2023-05-20 07:57:51 -05:00