nushell/crates
WindSoilder 724818030d
add type check during eval time (#11475)
# Description
Fixes: #11438 

Take the following as example:
```nushell
def spam [foo: string] {
    $'foo: ($foo | describe)'
}
def outer [--foo: string] {
    spam $foo
}

outer
```
When we call `outer`, type checker only check the all for `outer`, but
doesn't check inside the body of `outer`. This pr is trying to introduce
a type checking process through `Type::is_subtype()` during eval time.

## NOTE
I'm not really sure if it's easy to make a check inside the body of
`outer`. Adding an eval time type checker seems like an easier solution.
As a result: `outer` will be caught by runtime, not parse time type
checker

cc @kubouch 

# User-Facing Changes
After this pr the following call will failed:
```nushell
> outer
Error: nu:🐚:cant_convert

  × Can't convert to string.
   ╭─[entry #27:1:1]
 1 │ def outer [--foo: any] {
 2 │     spam $foo
   ·          ──┬─
   ·            ╰── can't convert nothing to string
 3 │ }
   ╰────
```

# Tests + Formatting
Done

# After Submitting
NaN
2024-01-12 23:48:53 +08:00
..
nu_plugin_custom_values Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu_plugin_example Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu_plugin_formats Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu_plugin_gstat Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu_plugin_inc Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-cli Make only_buffer_difference: true work (#11488) 2024-01-11 11:58:14 -06:00
nu-cmd-base Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-cmd-dataframe Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-cmd-extra Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-cmd-lang Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-color-config Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-command Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-engine add type check during eval time (#11475) 2024-01-12 23:48:53 +08:00
nu-explore Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-glob Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-json Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-lsp Fix "Char index out of bounds" Error (#11526) 2024-01-11 15:24:49 -06:00
nu-parser Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-path Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-plugin Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
nu-pretty-hex Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-protocol add type check during eval time (#11475) 2024-01-12 23:48:53 +08:00
nu-std add type check during eval time (#11475) 2024-01-12 23:48:53 +08:00
nu-system Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-table Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-term-grid Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-test-support Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
nu-utils Bump to dev version 0.89.1 (#11513) 2024-01-11 00:19:21 +13:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.