mirror of
https://github.com/nushell/nushell.git
synced 2024-12-01 12:54:16 +01: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` |
||
---|---|---|
.. | ||
diff.rs | ||
fake_persistent_plugin.rs | ||
fake_register.rs | ||
lib.rs | ||
plugin_test.rs | ||
spawn_fake_plugin.rs |