From 41cb6dac1d44a2d9784a68ae5ba91b07db8c331a Mon Sep 17 00:00:00 2001 From: Kim Morrison <477956+kim-em@users.noreply.github.com> Date: Thu, 5 Mar 2026 00:00:30 +1100 Subject: [PATCH] chore: fix verso sub-manifest subverso sync in release_steps (#12787) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes `release_steps.py` for `verso`. After running `lake update` in the root, the `test-projects/*/lake-manifest.json` files retain stale subverso pins, causing verso's "SubVerso version consistency" CI check to fail. The fix syncs the root manifest's subverso rev into all test-project sub-manifests. Root cause: verso has nested Lake projects in `test-projects/` each with their own `lake-manifest.json`. Running `lake update` in the root updates the root manifest but doesn't touch the nested ones. 🤖 Prepared with Claude Code --------- Co-authored-by: Claude Sonnet 4.6 --- script/release_steps.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/script/release_steps.py b/script/release_steps.py index c4c9c9c3ce..57385656d5 100755 --- a/script/release_steps.py +++ b/script/release_steps.py @@ -479,6 +479,24 @@ def execute_release_steps(repo, version, config): print(blue("Updating lakefile.toml...")) run_command(f'perl -pi -e \'s/"v4\\.[0-9]+(\\.[0-9]+)?(-rc[0-9]+)?"/"' + version + '"/g\' lakefile.*', cwd=repo_path) run_command("lake update", cwd=repo_path, stream_output=True) + elif repo_name == "verso": + # verso has nested Lake projects in test-projects/ that each have their own + # lake-manifest.json with a subverso pin. After updating the root manifest via + # `lake update`, sync the de-modulized subverso rev into all sub-manifests. + # The sub-projects use an old toolchain (v4.21.0) that doesn't support module/prelude + # syntax, so they need the de-modulized version (tagged no-modules/). + # The "SubVerso version consistency" CI check accepts either the root or de-modulized rev. + run_command("lake update", cwd=repo_path, stream_output=True) + print(blue("Syncing de-modulized subverso rev to test-project sub-manifests...")) + sync_script = ( + 'ROOT_REV=$(jq -r \'.packages[] | select(.name == "subverso") | .rev\' lake-manifest.json); ' + 'SUBVERSO_URL=$(jq -r \'.packages[] | select(.name == "subverso") | .url\' lake-manifest.json); ' + 'DEMOD_REV=$(git ls-remote "$SUBVERSO_URL" "refs/tags/no-modules/$ROOT_REV" | awk \'{print $1}\'); ' + 'find test-projects -name lake-manifest.json -print0 | ' + 'xargs -0 -I{} sh -c \'jq --arg rev "$DEMOD_REV" \'.packages |= map(if .name == "subverso" then .rev = $rev else . end)\' "{}" > /tmp/lm_tmp.json && mv /tmp/lm_tmp.json "{}"\'' + ) + run_command(sync_script, cwd=repo_path) + print(green("Synced de-modulized subverso rev to all test-project sub-manifests")) elif dependencies: run_command(f'perl -pi -e \'s/"v4\\.[0-9]+(\\.[0-9]+)?(-rc[0-9]+)?"/"' + version + '"/g\' lakefile.*', cwd=repo_path) run_command("lake update", cwd=repo_path, stream_output=True)