fix(release): bump-version.sh rewrites inter-workspace dep pins (SQLR-9)#88
Merged
Merged
Conversation
The release-pr.yml dispatch for v0.3.0 failed at `cargo build` with `failed to select a version for the requirement sqlrite-ask = "^0.2"` because bump-version.sh updated the package-level `version = "X.Y.Z"` field in 11 manifests but ignored the three `version = "..."` pins that workspace crates declare on each other (engine→sqlrite-ask, sqlrite-mcp→engine, wasm SDK→sqlrite-ask). PR #87 patched those by hand; this change makes the script handle them automatically. Approach: detect any TOML line containing both `version = "..."` and `path = "..."`, rewrite the version to the full bumped semver. This is unambiguous in the repo (no false positives) and handles both inline-table orderings. Future workspace crates added with the same path+version shape get rewritten with no script changes. The rewrite uses the full X.Y.Z[-pre][+build] form (e.g. "0.3.0", not "0.3"), which catches drift inside a minor and works with the prerelease-dispatch path. Visible effect on the next release PR: the three pins flip from "0.3" to "0.3.0". Also extends the verify loop to flag any surviving same-line `path = ... version = ...` pin not at the bumped version, so a future refactor that changes pin shape (e.g. multi-line deps) fails loudly instead of silently producing a broken release branch. Verification: - bump-version.sh 9.9.9-test rewrites all three pins (both inline-table orderings). - Re-running with the same arg is byte-exact idempotent. - `cargo build --workspace --exclude sqlrite-desktop ...` resolves cleanly — the original SQLR-9 failure mode no longer reproduces. - Verify-loop logic confirmed against a staled-pin fixture. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The header docstring said "eight Cargo.toml / pyproject.toml files, plus three JSON manifests — eleven files total" and the footer said "the ten-file bump". TOML_FILES has nine entries (root engine, ffi, ask, mcp, python ×2, nodejs, wasm, desktop) plus three JSON manifests = twelve total. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/bump-version.shto rewrite the three inter-workspaceversion = "..."pins it currently misses (engine→sqlrite-ask, sqlrite-mcp→engine, wasm SDK→sqlrite-ask). The v0.3.0 release-pr.yml dispatch failed atcargo buildwithfailed to select a version for the requirement sqlrite-ask = "^0.2"because of this gap; PR release: v0.3.0 #87 patched the three pins by hand. Closes SQLR-9.version = "..."andpath = "...". Unambiguous in this repo, handles both inline-table orderings, future-proof for new workspace crates with the same shape.X.Y.Z[-pre][+build](e.g.0.3.0,0.3.0-rc.1). Catches drift inside a minor and works with prerelease dispatches. Visible cosmetic side-effect on the next release PR: pins flip from"0.3"→"0.3.0".path+versionpin not at$VERSION, so a future shape change (e.g. multi-line deps) fails loudly instead of silently producing a broken release branch.Test plan
./scripts/bump-version.sh 9.9.9-testrewrites all three pins (verified both inline-table orderings: version-first inCargo.toml/sdk/wasm/Cargo.toml, path-first insqlrite-mcp/Cargo.toml).cargo build --workspace --exclude sqlrite-desktop --exclude sqlrite-python --exclude sqlrite-nodejsresolves cleanly at9.9.9-test— the original SQLR-9 failure mode no longer reproduces.version = "0.0.0"injected intosqlrite-mcp/Cargo.toml)."0.3"to"0.3.0"is the expected cosmetic delta on the next release PR (matches the lockstep release-wave story indocs/release-plan.md).🤖 Generated with Claude Code