Skip to content

fix(release): bump-version.sh rewrites inter-workspace dep pins (SQLR-9)#88

Merged
joaoh82 merged 2 commits into
mainfrom
sqlr-9-bump-version-inter-workspace-pins
May 4, 2026
Merged

fix(release): bump-version.sh rewrites inter-workspace dep pins (SQLR-9)#88
joaoh82 merged 2 commits into
mainfrom
sqlr-9-bump-version-inter-workspace-pins

Conversation

@joaoh82

@joaoh82 joaoh82 commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Teach scripts/bump-version.sh to rewrite the three inter-workspace version = "..." pins it currently misses (engine→sqlrite-ask, sqlrite-mcp→engine, wasm SDK→sqlrite-ask). The v0.3.0 release-pr.yml dispatch failed at cargo build with failed 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.
  • Detection rule: any TOML line with both version = "..." and path = "...". Unambiguous in this repo, handles both inline-table orderings, future-proof for new workspace crates with the same shape.
  • Format: full 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".
  • Verify-loop extension flags any same-line path + version pin not at $VERSION, so a future shape change (e.g. multi-line deps) fails loudly instead of silently producing a broken release branch.
  • Drive-by: fixed pre-existing off-by-one in the banner ("eleven files total" / "ten-file bump" → "twelve files total" / "twelve-file bump") to match the actual nine TOML + three JSON manifests.

Test plan

  • ./scripts/bump-version.sh 9.9.9-test rewrites all three pins (verified both inline-table orderings: version-first in Cargo.toml / sdk/wasm/Cargo.toml, path-first in sqlrite-mcp/Cargo.toml).
  • Re-running with the same arg is byte-exact idempotent (snapshot + diff against the three target manifests).
  • cargo build --workspace --exclude sqlrite-desktop --exclude sqlrite-python --exclude sqlrite-nodejs resolves cleanly at 9.9.9-test — the original SQLR-9 failure mode no longer reproduces.
  • Verify-loop logic catches a manually-staled pin (proven against version = "0.0.0" injected into sqlrite-mcp/Cargo.toml).
  • Reviewer: confirm the format flip from "0.3" to "0.3.0" is the expected cosmetic delta on the next release PR (matches the lockstep release-wave story in docs/release-plan.md).

🤖 Generated with Claude Code

joaoh82 and others added 2 commits May 4, 2026 10:12
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>
@joaoh82 joaoh82 merged commit 77be91b into main May 4, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant