mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:15:49 +02:00
Remove Signature.vectorizes_over_list
entirely (#9777)
# Description With the current typechecking logic this property has no effect. It was only used in the example testing, and provided some indication of this vectorizing property. With #9742 all commands that previously declared it have explicit list signatures. If we want to get it back in the future we can reconstruct it from the signature. Simplifies the example testing a bit. # User-Facing Changes Causes a breaking change for plugins that previously declared it. While this causes a compile fail, this was already broken by our more stringent type checking. This will be a good reminder for plugin authors to update their signature as well to reflect the more stringent type checking.
This commit is contained in:
committed by
GitHub
parent
d9230a76f3
commit
b2e191f836
@ -43,7 +43,6 @@ mod test_examples {
|
||||
&mut make_engine_state(cmd.clone_box()),
|
||||
&signature.input_output_types,
|
||||
signature.operates_on_cell_paths(),
|
||||
signature.vectorizes_over_list,
|
||||
),
|
||||
);
|
||||
check_example_evaluates_to_expected_output(&example, cwd.as_path(), &mut engine_state);
|
||||
|
@ -22,7 +22,6 @@ impl Command for BitsAnd {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required(
|
||||
"target",
|
||||
SyntaxShape::Int,
|
||||
|
@ -23,7 +23,6 @@ impl Command for BitsNot {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.allow_variants_without_examples(true)
|
||||
.switch(
|
||||
"signed",
|
||||
|
@ -22,7 +22,6 @@ impl Command for BitsOr {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required(
|
||||
"target",
|
||||
SyntaxShape::Int,
|
||||
|
@ -25,7 +25,6 @@ impl Command for BitsRol {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required("bits", SyntaxShape::Int, "number of bits to rotate left")
|
||||
.switch(
|
||||
"signed",
|
||||
|
@ -25,7 +25,6 @@ impl Command for BitsRor {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required("bits", SyntaxShape::Int, "number of bits to rotate right")
|
||||
.switch(
|
||||
"signed",
|
||||
|
@ -25,7 +25,6 @@ impl Command for BitsShl {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required("bits", SyntaxShape::Int, "number of bits to shift left")
|
||||
.switch(
|
||||
"signed",
|
||||
|
@ -25,7 +25,6 @@ impl Command for BitsShr {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required("bits", SyntaxShape::Int, "number of bits to shift right")
|
||||
.switch(
|
||||
"signed",
|
||||
|
@ -22,7 +22,6 @@ impl Command for BitsXor {
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required(
|
||||
"target",
|
||||
SyntaxShape::Int,
|
||||
|
@ -39,7 +39,6 @@ impl Command for BytesAdd {
|
||||
(Type::Table(vec![]), Type::Table(vec![])),
|
||||
(Type::Record(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.allow_variants_without_examples(true)
|
||||
.required("data", SyntaxShape::Binary, "the binary to add")
|
||||
.named(
|
||||
|
@ -46,7 +46,6 @@ impl Command for BytesAt {
|
||||
(Type::Table(vec![]), Type::Table(vec![])),
|
||||
(Type::Record(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.required("range", SyntaxShape::Range, "the range to get bytes")
|
||||
.rest(
|
||||
"rest",
|
||||
|
@ -26,7 +26,6 @@ impl Command for BytesLen {
|
||||
(Type::Record(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.rest(
|
||||
"rest",
|
||||
SyntaxShape::CellPath,
|
||||
|
@ -21,7 +21,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
Type::List(Box::new(Type::Float)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
Type::List(Box::new(Type::Float)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
Type::List(Box::new(Type::Float)),
|
||||
),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ impl Command for SubCommand {
|
||||
),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.category(Category::Math)
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,6 @@ impl Command for SubCommand {
|
||||
(Type::Table(vec![]), Type::Table(vec![])),
|
||||
(Type::Record(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.vectorizes_over_list(true)
|
||||
.allow_variants_without_examples(true)
|
||||
.category(Category::Platform)
|
||||
}
|
||||
|
@ -39,7 +39,6 @@ impl Command for SubCommand {
|
||||
SyntaxShape::CellPath,
|
||||
"for a data structure input, add links to all strings at the given cell paths",
|
||||
)
|
||||
.vectorizes_over_list(true)
|
||||
.allow_variants_without_examples(true)
|
||||
.category(Category::Platform)
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ impl Command for DecodeHex {
|
||||
(Type::Record(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.rest(
|
||||
"rest",
|
||||
SyntaxShape::CellPath,
|
||||
|
@ -25,7 +25,6 @@ impl Command for EncodeHex {
|
||||
(Type::Record(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
.vectorizes_over_list(true)
|
||||
.rest(
|
||||
"rest",
|
||||
SyntaxShape::CellPath,
|
||||
|
Reference in New Issue
Block a user