feat!: fix some lifetimes in InputContainerInner, almast done one example, add default for plugin, rebase src from crate/bevy_controls to src

This commit is contained in:
2024-02-10 02:42:18 +01:00
parent 5fc1382ceb
commit 608781faf6
19 changed files with 899 additions and 84 deletions
+26 -31
View File
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CURDIR="$(realpath "$(dirname "$0")")"
@@ -29,29 +29,6 @@ usage %s <path/to/Cargoctoml>\n
exit
fi
generate_combinations() {
items="$1"
size=$2
current=$3
combination="$4"
if [ "$current" -eq "$size" ]; then
echo "$combination"
return
fi
# Split items into positional parameters
set -- $items
while [ $# -gt 0 ]; do
item=$1
shift
new_combination="$combination $item"
remaining_items="$@"
generate_combinations "$remaining_items" $size $(($current + 1)) "$new_combination"
set -- "$item" $@
done
}
CARGO_PATH="$1"
if [ -z "$CARGO_PATH" ]; then
@@ -63,20 +40,38 @@ if [ -d "$CARGO_PATH" ]; then
CARGO_PATH="${CARGO_PATH}/Cargo.toml"
fi
features=$(grep '^\[features\]' "$CARGO_PATH" -A99999999 | grep '^\[' -m 2 -B99999999 | grep -v '^\[' | cut -d '=' -f 1 | grep -v 'default')
num_features=$(echo "$features" | wc -w | tr -d ' ')
features=$(grep '^\[features\]' $1 -A99999999 | grep '^\[' -m 2 -B99999999 | grep -v '^\[' | cut -d '=' -f 1 | grep -v 'default')
i=1
while [ $i -le $num_features ]; do
generate_combinations() {
local items=($1)
local size=$2
local current=$3
local combination=$4
if [ $current -eq $size ]; then
echo "$combination"
return
fi
for ((i = 0; i < ${#items[@]}; ++i)); do
new_combination="$combination ${items[$i]}"
remaining_items=("${items[@]:0:$i}" "${items[@]:$((i + 1))}")
generate_combinations "$(IFS=" "; echo "${remaining_items[*]}")" $size $((current + 1)) "$new_combination"
done
}
for ((i = 1; i <= $(wc -w <<< "$features"); ++i)); do
echo "Generating combinations of size $i"
combos=$(generate_combinations "$features" $i 0 "")
echo "$combos" | while IFS= read -r line; do
combo=$(echo $line | xargs) # Trim
echo "$combos" | while read line
do
echo "Running clippy with features: $line"
combo=$(echo $combo | xargs) # Trim
echo "Running clippy with features: $combo"
if ! cargo clippy --features "$combo"; then
echo "Error found in combination: $combo"
exit 1
fi
done
i=$((i + 1))
done