mirror of
https://github.com/nushell/nushell
synced 2024-12-29 06:23:11 +00:00
2562e306b6
# Description Requested by @ayax79. This makes the custom value behavior more correct, by calling the methods on the plugin to handle the custom values in examples rather than the methods on the custom values themselves. This helps for handle-type custom values (like what he's doing with dataframes). - Equality checking in `PluginTest::test_examples()` changed to use `PluginInterface::custom_value_partial_cmp()` - Base value rendering for `PluginSignature` changed to use `Plugin::custom_value_to_base_value()` - Had to be moved closer to `serve_plugin` for this reason, so the test for writing signatures containing custom values was removed - That behavior should still be tested to some degree, since if custom values are not handled, signatures will fail to parse, so all of the other tests won't work. # User-Facing Changes - `Record::sort_cols()` method added to share functionality required by `PartialCmp`, and it might also be slightly faster - Otherwise, everything should mostly be the same but better. Plugins that don't implement special handling for custom values will still work the same way, because the default implementation is just a pass-through to the `CustomValue` methods. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE | ||
README.md |
nu-protocol
The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.