Commit 77be91b
fix(release): bump-version.sh rewrites inter-workspace dep pins (SQLR-9) (#88)
* fix(release): bump-version.sh rewrites inter-workspace dep pins (SQLR-9)
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>
* docs(release): fix off-by-one file counts in bump-version.sh banner
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>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent be871bc commit 77be91b
1 file changed
Lines changed: 38 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
147 | 166 | | |
148 | 167 | | |
149 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
150 | 185 | | |
151 | 186 | | |
152 | 187 | | |
| |||
157 | 192 | | |
158 | 193 | | |
159 | 194 | | |
160 | | - | |
| 195 | + | |
161 | 196 | | |
0 commit comments