nushell/tests/plugins
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
..
formats Correct line folding in from ics/from vcf (#10577) 2023-10-03 19:11:16 +02:00
cache_file.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
config.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
core_inc.rs Plugin explicit flags (#11581) 2024-01-22 15:00:43 -06:00
custom_values.rs Fix deadlock on PluginCustomValue drop (#12418) 2024-04-05 21:57:00 -05:00
env.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
mod.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
nu_plugin_nu_example.rs Add an example Nushell plugin written in Nushell itself (#12574) 2024-04-19 09:53:30 +03:00
register.rs Change PluginCommand API to be more like Command (#12279) 2024-03-27 11:59:57 +01:00
stream.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
stress_internals.rs Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00