mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 14:21:45 +02:00
Fixes #15243 # Description As noted in #15243, a record with more characters after it (e.g., `{a:b}/`) will cause an OOM due to an infinite loop, introduced by #15023. This happens because the entire string `{a:b}/` is lexed as one token and passed to `parse_record`, where it repeatedly lexes until it hits the closing `}`. This PR detects such extra characters and reports an error. # User-Facing Changes `{a:b}/` and other such constructions will no longer cause infinite loops. Before #15023, you would've seen an "Unclosed delimiter" error message, but this PR changes that to "Invalid characters." ``` Error: nu::parser::extra_token_after_closing_delimiter × Invalid characters after closing delimiter ╭─[entry #5:1:7] 1 │ {a:b}/ · ┬ · ╰── invalid characters ╰──── help: Try removing them. ``` # Tests + Formatting # After Submitting
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.