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

@ -29,7 +29,6 @@ impl Command for DecodeBase64 {
(Type::Table(vec![]), Type::Table(vec![])),
(Type::Record(vec![]), Type::Record(vec![])),
])
.vectorizes_over_list(true)
.allow_variants_without_examples(true)
.named(
"character-set",

View File

@ -35,7 +35,6 @@ impl Command for EncodeBase64 {
(Type::Table(vec![]), Type::Table(vec![])),
(Type::Record(vec![]), Type::Record(vec![])),
])
.vectorizes_over_list(true)
.allow_variants_without_examples(true)
.named(
"character-set",

View File

@ -20,7 +20,6 @@ impl Command for SubCommand {
(Type::String, Type::List(Box::new(Type::String))),
(Type::List(Box::new(Type::String)), Type::Table(vec![])),
])
.vectorizes_over_list(true)
.allow_variants_without_examples(true)
.required(
"separator",

View File

@ -26,7 +26,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)
.rest(
"rest",

View File

@ -24,7 +24,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)
.rest(
"rest",

View File

@ -24,7 +24,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)
.rest(
"rest",

View File

@ -26,7 +26,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::String)),
),
])
.vectorizes_over_list(true)
.allow_variants_without_examples(true)
.rest(
"rest",

View File

@ -26,7 +26,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::String)),
),
])
.vectorizes_over_list(true)
.allow_variants_without_examples(true)
.rest(
"rest",

View File

@ -25,7 +25,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)
.rest(
"rest",

View File

@ -25,7 +25,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)
.rest(
"rest",

View File

@ -26,7 +26,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)
.rest(
"rest",

View File

@ -23,7 +23,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)
.rest(
"rest",

View File

@ -36,7 +36,6 @@ impl Command for SubCommand {
(Type::Record(vec![]), Type::Record(vec![])),
(Type::List(Box::new(Type::String)), Type::List(Box::new(Type::Bool)))
])
.vectorizes_over_list(true)
.required("string", SyntaxShape::String, "the substring to find")
.rest(
"rest",

View File

@ -35,7 +35,6 @@ impl Command for SubCommand {
(Type::Record(vec![]), Type::Record(vec![])),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.required("string", SyntaxShape::String, "the string to match")
.rest(
"rest",

View File

@ -29,7 +29,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::List(Box::new(Type::String)))),
),
])
.vectorizes_over_list(true)
.allow_variants_without_examples(true)
.category(Category::Strings)
}

View File

@ -43,7 +43,6 @@ impl Command for SubCommand {
(Type::Table(vec![]), Type::Table(vec![])),
(Type::Record(vec![]), Type::Record(vec![])),
])
.vectorizes_over_list(true) // TODO: no test coverage
.allow_variants_without_examples(true)
.required("string", SyntaxShape::String, "the string to find in the input")
.switch(

View File

@ -36,7 +36,6 @@ impl Command for SubCommand {
(Type::Record(vec![]), Type::Record(vec![])),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.switch(
"grapheme-clusters",
"count length using grapheme clusters (all visible chars have length 1)",

View File

@ -44,7 +44,6 @@ impl Command for SubCommand {
Type::List(Box::new(Type::String)),
),
])
.vectorizes_over_list(true)
.required("find", SyntaxShape::String, "the pattern to find")
.required("replace", SyntaxShape::String, "the replacement string")
.rest(

View File

@ -26,7 +26,6 @@ impl Command for SubCommand {
(Type::Record(vec![]), Type::Record(vec![])),
])
.allow_variants_without_examples(true)
.vectorizes_over_list(true)
.rest(
"rest",
SyntaxShape::CellPath,

View File

@ -36,7 +36,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)
.required("string", SyntaxShape::String, "the string to match")
.rest(

View File

@ -48,7 +48,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)
.switch(
"grapheme-clusters",

View File

@ -44,7 +44,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)
.rest(
"rest",