Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom values in plugin examples #12213

Merged
merged 1 commit into from Mar 18, 2024

Conversation

devyn
Copy link
Contributor

@devyn devyn commented Mar 15, 2024

Description

@ayax79 says that the dataframe commands all have dataframe custom values in their examples, and they're used for tests.

Rather than send the custom values to the engine, if they're in examples, this change just renders them using to_base_value() first. That way we avoid potentially having to hold onto custom values in plugins.nu that might not be valid indefinitely - as will be the case for dataframes in particular - but we still avoid forcing plugin writers to not use custom values in their examples.

User-Facing Changes

  • Custom values usable in plugin examples

Tests + Formatting

  • 馃煝 toolkit fmt
  • 馃煝 toolkit clippy
  • 馃煝 toolkit test
  • 馃煝 toolkit test stdlib

After Submitting

@ayax79 says that the dataframe commands all have dataframe custom
values in their examples, and they're used for tests.

Rather than send the custom values to the engine, if they're in
examples, this change just renders them using `to_base_value()` first.
That way we avoid potentially having to hold onto custom values in
`plugins.nu` that might not be valid indefinitely - as will be the case
for dataframes in particular - but we still avoid forcing plugin writers
to not use custom values in their examples.
@fdncred fdncred merged commit 992359a into nushell:main Mar 18, 2024
15 checks passed
@fdncred
Copy link
Collaborator

fdncred commented Mar 18, 2024

Thanks!

@hustcer hustcer added this to the v0.92.0 milestone Mar 18, 2024
@fdncred fdncred added the pr:plugins This PR is related to plugins label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:plugins This PR is related to plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants