Make IR the default evaluator (#13718)

# Description

Makes IR the default evaluator, in preparation to remove the non-IR
evaluator in a future release.

# User-Facing Changes

* Remove `NU_USE_IR` option
* Add `NU_DISABLE_IR` option
* IR is enabled unless `NU_DISABLE_IR` is set

# After Submitting
- [ ] release notes
This commit is contained in:
Devyn Cairns
2024-09-15 14:54:38 -07:00
committed by GitHub
parent c535c24d03
commit 9ca0fb772d
19 changed files with 77 additions and 57 deletions

View File

@ -137,7 +137,7 @@ mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -157,6 +157,7 @@ mod test {
working_set.add_decl(Box::new(ToCsv {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -161,7 +161,7 @@ fn json_list(input: &[Value]) -> Result<Vec<nu_json::Value>, ShellError> {
mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -182,6 +182,7 @@ mod test {
working_set.add_decl(Box::new(ToJson {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -335,7 +335,7 @@ fn get_padded_string(text: String, desired_length: usize, padding_character: cha
#[cfg(test)]
mod tests {
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
@ -474,6 +474,7 @@ mod tests {
working_set.add_decl(Box::new(ToMd {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -275,7 +275,7 @@ where
mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -296,6 +296,7 @@ mod test {
working_set.add_decl(Box::new(ToMsgpack {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -107,7 +107,7 @@ mod test {
use super::*;
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
#[test]
fn test_examples() {
@ -126,6 +126,7 @@ mod test {
working_set.add_decl(Box::new(ToNuon {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -144,7 +144,7 @@ fn update_metadata(metadata: Option<PipelineMetadata>) -> Option<PipelineMetadat
mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -165,6 +165,7 @@ mod test {
working_set.add_decl(Box::new(ToText {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -102,7 +102,7 @@ fn to_tsv(
mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -123,6 +123,7 @@ mod test {
working_set.add_decl(Box::new(ToTsv {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -514,7 +514,7 @@ impl Job {
mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -535,6 +535,7 @@ mod test {
working_set.add_decl(Box::new(ToXml {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};

View File

@ -125,7 +125,7 @@ fn to_yaml(input: PipelineData, head: Span) -> Result<PipelineData, ShellError>
mod test {
use nu_cmd_lang::eval_pipeline_without_terminal_expression;
use crate::Metadata;
use crate::{Get, Metadata};
use super::*;
@ -146,6 +146,7 @@ mod test {
working_set.add_decl(Box::new(ToYaml {}));
working_set.add_decl(Box::new(Metadata {}));
working_set.add_decl(Box::new(Get {}));
working_set.render()
};