Add infrastructure for experimental options (#16028)

Co-authored-by: Bahex <Bahex@users.noreply.github.com>
This commit is contained in:
Piepmatz
2025-07-01 18:36:51 +02:00
committed by GitHub
parent f4136aa3f4
commit a86a0dd16e
19 changed files with 731 additions and 24 deletions

View File

@ -16,11 +16,11 @@ bench = false
workspace = true
[dependencies]
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
nu-derive-value = { path = "../nu-derive-value", version = "0.105.2" }
nu-glob = { path = "../nu-glob", version = "0.105.2" }
nu-path = { path = "../nu-path", version = "0.105.2" }
nu-system = { path = "../nu-system", version = "0.105.2" }
nu-derive-value = { path = "../nu-derive-value", version = "0.105.2" }
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
brotli = { workspace = true, optional = true }
bytes = { workspace = true }
@ -38,7 +38,7 @@ serde = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
thiserror = "2.0.12"
thiserror = { workspace = true }
typetag = "0.2"
os_pipe = { workspace = true, optional = true, features = ["io_safety"] }
log = { workspace = true }

View File

@ -93,6 +93,13 @@ pub fn report_compile_error(working_set: &StateWorkingSet, error: &CompileError)
report_error(working_set, error);
}
pub fn report_experimental_option_warning(
working_set: &StateWorkingSet,
warning: &dyn miette::Diagnostic,
) {
report_warning(working_set, warning);
}
fn report_error(working_set: &StateWorkingSet, error: &dyn miette::Diagnostic) {
eprintln!("Error: {:?}", CliError(error, working_set));
// reset vt processing, aka ansi because illbehaved externals can break it