From 97d50d7a2548f1f2eab4440f4ff81596df7bee15 Mon Sep 17 00:00:00 2001 From: gold-silver-copper <157451540+gold-silver-copper@users.noreply.github.com> Date: Tue, 10 Nov 2026 17:56:01 -0800 Subject: [PATCH] fix(scripts): version-switch.sh says whether the start warned of plugins.toml --- scripts/version-switch-expected.txt | 2 +- scripts/version-switch.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/version-switch-expected.txt b/scripts/version-switch-expected.txt index 4701207a3e..5a941c6549 100644 --- a/scripts/version-switch-expected.txt +++ b/scripts/version-switch-expected.txt @@ -1,5 +1,5 @@ # Checks of scripts/version-switch.sh known to fail between v0.46.0 and main. # Pass this file with --expected on the release PR; delete a line when its # check passes (the run reports it as XPASS and fails until then). -settings-upgrade # main ignores v0.46.0's plugins.toml: a plugin turned off comes back on, silently +settings-upgrade # main ignores v0.46.0's plugins.toml (its start warns so): a plugin turned off comes back on settings-downgrade # v0.46.0 ignores main's settings.toml [plugins] and writes a fresh plugins.toml diff --git a/scripts/version-switch.sh b/scripts/version-switch.sh index e4b5877b64..098bda499e 100755 --- a/scripts/version-switch.sh +++ b/scripts/version-switch.sh @@ -219,7 +219,7 @@ none_compiled() { [[ -z "$1" || "$1" == "0 crates"* ]]; } # untouched SUMMARY: true when it compiled nothing and changed no locked version. untouched() { [[ -z "$1" || "$1" == "0 crates compiled, 0 locked versions changed" ]]; } -built="" again="" turn_rc=0 +built="" again="" turn_rc=0 turn_name="" # prebuild LABEL NAME: `rig build` with launcher LABEL, under --lock when # given; records its time, what it compiled (in $built) and the disk # RIG_HOME/target uses. @@ -246,7 +246,7 @@ turn() { touch "$logs/.stamp" sleep 1 rig "$@" - turn_rc=$rc + turn_rc=$rc turn_name=$name again=$(build_since "$name.turn") none_compiled "$again" || switches+=("$(printf '%-16s %-4s turn compiled again: %s' "$name" "$label" "$again")") echo " $name: exit $rc, turn ${wall}s" @@ -255,6 +255,7 @@ turn() { # plugin_off LABEL NAME PLUGIN ID: checks that launcher LABEL lists PLUGIN off, # or refuses the settings with a message naming them; a refusal counts only # when the turn before it failed too, so no start ran without the setting. +# A plugin on again says whether that turn warned of plugins.toml. plugin_off() { local label="$1" name="$2" plugin="$3" id="$4" rig "$label" "$name" plugin list @@ -264,6 +265,8 @@ plugin_off() { check "$id" "$clear" "refused (exit $rc, the turn before exit $turn_rc): $(first_error "$name")" elif grep -E -q "^off +$plugin\b" "$logs/$name.out"; then check "$id" 0 "$plugin is still off" + elif grep -q -F plugins.toml "$logs/$turn_name.err"; then + check "$id" 1 "$plugin is on again; the turn before warned of plugins.toml" else check "$id" 1 "$plugin is on again, silently" fi