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:
Stefan Holderbach
2023-07-26 23:34:43 +02:00
committed by GitHub
parent d9230a76f3
commit b2e191f836
67 changed files with 14 additions and 125 deletions

View File

@ -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);

View File

@ -22,7 +22,6 @@ impl Command for BitsAnd {
Type::List(Box::new(Type::Int)),
),
])
.vectorizes_over_list(true)
.required(
"target",
SyntaxShape::Int,

View File

@ -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",

View File

@ -22,7 +22,6 @@ impl Command for BitsOr {
Type::List(Box::new(Type::Int)),
),
])
.vectorizes_over_list(true)
.required(
"target",
SyntaxShape::Int,

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -22,7 +22,6 @@ impl Command for BitsXor {
Type::List(Box::new(Type::Int)),
),
])
.vectorizes_over_list(true)
.required(
"target",
SyntaxShape::Int,

View File

@ -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(

View File

@ -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",

View File

@ -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,

View File

@ -21,7 +21,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -21,7 +21,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -21,7 +21,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::Float)),
),
])
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::Float)),
),
])
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::Float)),
),
])
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.category(Category::Math)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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,

View File

@ -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,