nushell/crates
zc he f46f8b286b
refactor(parser): use var_id for most constants in ResolvedImportPattern (#14920)
# Description

This PR replaces most of the constants in `ResolvedImportPattern` from
values to VarIds, this has benefits of:
1. less duplicated variables in state
2. precise span of variable, for example when calling `goto def` on a
const imported by the `use` command, this allows it to find the original
definition, instead of where the `use` command is.

Note that the logic is different here for nested submodules, not all
values are flattened and propagated to the outmost record variable, but
I didn't find any differences in real world usage.

I noticed that it was changed from `VarId` to `Value` in #10049.
Maybe @kubouch can find some edge cases where this PR fails to work as
expected.

In my view, the record constants for `ResolvedImportPattern` should even
reduced to single entry, if not able to get rid of.

# User-Facing Changes

# Tests + Formatting

# After Submitting
2025-01-26 15:43:34 +02:00
..
nu_plugin_custom_values Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_example Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_formats Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_gstat Bump git2 from 0.19.0 to 0.20.0 (#14776) 2025-01-08 13:53:02 +00:00
nu_plugin_inc Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_nu_example Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_polars Bump tokio from 1.42.0 to 1.43.0 (#14829) 2025-01-15 09:30:09 +08:00
nu_plugin_python Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_query Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu_plugin_stress_internals Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-cli Fallback to file completer in custom/external completer (#14781) 2025-01-26 13:44:01 +08:00
nu-cmd-base Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-cmd-extra Rename fmt to format number (#14875) 2025-01-21 20:35:34 +08:00
nu-cmd-lang Implementing ByteStream interuption on infinite stream (#13552) 2025-01-11 13:28:08 -08:00
nu-cmd-plugin Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-color-config Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-command Fix improperly escaped strings in stor update (#14921) 2025-01-26 07:20:39 -06:00
nu-derive-value Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-engine Add new operators has and not-has (#14841) 2025-01-17 06:20:00 -06:00
nu-explore bump to rust version 1.82 (#14795) 2025-01-11 07:14:55 -06:00
nu-glob Create nu_glob::is_glob function (#14717) 2025-01-01 19:04:17 -05:00
nu-json Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-lsp refactor(parser): use var_id for most constants in ResolvedImportPattern (#14920) 2025-01-26 15:43:34 +02:00
nu-parser refactor(parser): use var_id for most constants in ResolvedImportPattern (#14920) 2025-01-26 15:43:34 +02:00
nu-path Don't expand ndots if prefixed with ./ (#14755) 2025-01-05 17:07:34 -05:00
nu-plugin Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-plugin-core Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-plugin-engine Convert Path to list in main and preserve case (#14764) 2025-01-10 10:18:44 -06:00
nu-plugin-protocol Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-plugin-test-support Bump similar from 2.6.0 to 2.7.0 (#14888) 2025-01-22 20:36:24 +08:00
nu-pretty-hex Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-protocol refactor(parser): use var_id for most constants in ResolvedImportPattern (#14920) 2025-01-26 15:43:34 +02:00
nu-std Link to Blog in the welcome banner (#14914) 2025-01-25 22:25:28 -05:00
nu-system Replace std::time::Instant with web_time::Instant (#14668) 2024-12-25 16:50:02 +08:00
nu-table Fix #14842 (#14885) 2025-01-22 06:49:25 -06:00
nu-term-grid Bump version to 0.101.1 (#14661) 2024-12-24 23:47:00 +01:00
nu-test-support Improve and fix filesize formatting/display (#14397) 2025-01-22 22:24:51 -08:00
nu-utils Improve and fix filesize formatting/display (#14397) 2025-01-22 22:24:51 -08:00
nuon fix nuon conversions of range values (#14687) 2025-01-07 21:29:39 +01: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.