nushell/crates/nu-parser/src
Devyn Cairns 2595f31541
Overhaul the plugin cache file with a new msgpack+brotli format (#12579)
# Description

- Plugin signatures are now saved to `plugin.msgpackz`, which is
brotli-compressed MessagePack.
- The file is updated incrementally, rather than writing all plugin
commands in the engine every time.
- The file always contains the result of the `Signature` call to the
plugin, even if commands were removed.
- Invalid data for a particular plugin just causes an error to be
reported, but the rest of the plugins can still be parsed

# User-Facing Changes

- The plugin file has a different filename, and it's not a nushell
script.
- The default `plugin.nu` file will be automatically migrated the first
time, but not other plugin config files.
- We don't currently provide any utilities that could help edit this
file, beyond `plugin add` and `plugin rm`
  - `from msgpackz`, `to msgpackz` could also help
- New commands: `plugin add`, `plugin rm`

# Tests + Formatting

Tests added for the format and for the invalid handling.

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

- [ ] Check for documentation changes
- [ ] Definitely needs release notes
2024-04-21 07:36:26 -05:00
..
deparse.rs update deps calamine and quick-xml (#11582) 2024-01-19 12:23:51 -06:00
exportable.rs Restructure nu-protocol in more meaningful units (#11917) 2024-03-10 18:45:45 +01:00
flatten.rs Add ListItem type for Expr::List (#12529) 2024-04-18 13:21:05 +02:00
known_external.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
lex.rs Fix: lex now throws error on unbalanced closing parentheses (issue #11982) (#12098) 2024-03-07 06:05:04 -06:00
lib.rs IO and redirection overhaul (#11934) 2024-03-14 15:51:55 -05:00
lite_parser.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
parse_keywords.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
parse_patterns.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
parse_shape_specs.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
parser_path.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
parser.rs Box ImportPattern in Expr (#12568) 2024-04-18 17:57:01 +02:00
type_check.rs IO and redirection overhaul (#11934) 2024-03-14 15:51:55 -05:00