Skip to content

Commit ac39b2c

Browse files
feat: stabilize v0.3.0 public API bundle (#77)
* feat: stabilize v0.3.0 public API bundle This commit aggregates the breaking and additive API changes that ship together as v0.3.0. The individual PRs landed under chore: prefixes to defer release-please from cutting an early version; this single feat: commit with a BREAKING CHANGE: footer is the trigger for the v0.3.0 release PR. Bundle contents (all merged to main): - #70 (PR #71) — Flat public Error enum + ergonomic constructors workspace-wide - #69 (PR #73) — Transaction API consolidation (RAII guard recommended; raw trio deprecated and #[doc(hidden)]) - #61 + #62 (PR #74) — FromRow modernization: #[derive(FromRow)] in new hyperdb-api-derive crate, RowAccessor with cached name->index lookup, breaking trait signature change, blanket tuple impls deleted, #[hyperdb(rename)] and #[hyperdb(index)] attributes - #76 — Follow-ups A/B/C: typed io::Error sources in process.rs, Error::InvalidOperation variant for caller misuse, structured SQLSTATE on Cancelled/Closed/Connection Follow-up D (flatten internal client::Error) deferred to v0.3.x as issue #75 — internal-only, zero external consumers, larger than originally scoped. The code change in this commit is a small documentation refresh on the crate-level rustdoc to (a) include hyperdb-api-derive in the companion crates list and (b) fix a stale crate name (sea-query-hyper -> sea-query-hyperdb). The body of the commit is the BREAKING CHANGE: footer below; release-please uses it to generate the v0.3.0 entry in CHANGELOG.md. See MIGRATING-0.3.md for full migration recipes covering every breaking change in the bundle. BREAKING CHANGE: v0.3.0 reshapes the public hyperdb_api::Error enum into a flat canonical structure (no Box<dyn StdError> cause channel, no kind() method, no Other catch-all variant), and its constructor surface (Error::new and Error::with_cause are deleted in favor of domain-specific snake_case constructors). It also changes the FromRow trait signature from fn from_row(row: &Row) to fn from_row(row: RowAccessor<'_>), deletes the blanket 1/2/3/4-tuple FromRow impls, deprecates Connection::begin_transaction/commit/rollback (use the RAII guard at Connection::transaction() instead), introduces a new Error::InvalidOperation variant, and changes Error::Cancelled and Error::Closed from tuple to struct variants carrying structured sqlstate. Every variant has a snake_case constructor; the FromRow derive lives in a re-exported hyperdb-api-derive crate. See MIGRATING-0.3.md for migration recipes. * chore(ci): publish hyperdb-api-derive in release.yml + dry-run in ci.yml Pre-release adversarial review of the v0.3.0 rollup CI/CD config caught that hyperdb-api-derive (added in PR #74) was missing from release.yml's publish-in-dependency-order step. hyperdb-api/Cargo.toml strictly pins hyperdb-api-derive = "=0.X.Y", so cargo publish -p hyperdb-api would fail at release time when crates.io can't resolve the strict version of derive (because release.yml never published it). Verified topologically: - hyperdb-api-derive has zero workspace deps (only syn/quote/proc-macro2 from the registry), so it can publish before any workspace crate. - It's a runtime dep of hyperdb-api only. - Inserted right after hyperdb-api-salesforce; existing order otherwise unchanged. Added a dependency-order comment to the publish step explaining the topology so future contributors don't break it. Also adds hyperdb-api-derive to ci.yml's publish dry-run job. The dry-run job exists exactly to catch this class of bug before release time. Without this addition, the same blocker could re-emerge after a future major-version refactor of derive. Updates the stale "7 workspace-member version rows" comment in release-please.yml to reflect the current 8-member workspace (hyperdb-api-derive added in #74). The lockfile-sync sentinel enumerates members at runtime via cargo metadata, so the count is informational; correctness is unchanged. Verified locally: - cargo publish -p hyperdb-api-derive --dry-run: succeeds - cargo publish -p sea-query-hyperdb --dry-run: succeeds - cargo publish -p hyperdb-bootstrap --dry-run: succeeds - cargo metadata workspace topology check: order in release.yml is consistent with non-dev deps across all 7 publishable crates.
1 parent 4008b07 commit ac39b2c

4 files changed

Lines changed: 23 additions & 9 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
# Catches Cargo.toml metadata regressions (missing license, bad
202202
# include paths, etc.) on the subset of crates that have no
203203
# workspace deps — those are the only ones `cargo publish --dry-run`
204-
# can check before anything's on crates.io. The other 4 crates
204+
# can check before anything's on crates.io. The other crates
205205
# (hyperdb-api-core, hyperdb-api-salesforce, hyperdb-api, hyperdb-mcp)
206206
# resolve their path+version deps against the live index, which can't
207207
# succeed until those deps are themselves published. (Note:
@@ -223,8 +223,9 @@ jobs:
223223
cache-key: publish-dry-run
224224
rustflags: ""
225225
- run: |
226-
cargo publish -p hyperdb-bootstrap --dry-run
227-
cargo publish -p sea-query-hyperdb --dry-run
226+
cargo publish -p hyperdb-bootstrap --dry-run
227+
cargo publish -p sea-query-hyperdb --dry-run
228+
cargo publish -p hyperdb-api-derive --dry-run
228229
229230
deny:
230231
# Enforces license allowlist, advisory ignore list, and banned-source

‎.github/workflows/release-please.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,13 @@ jobs:
119119

120120
# `cargo metadata --format-version=1` forces a lockfile
121121
# reconciliation pass against the current Cargo.tomls. Empirically
122-
# validated on this workspace: it flips exactly the 7 workspace-
122+
# validated on this workspace: it flips exactly the 8 workspace-
123123
# member version rows (hyperdb-api, hyperdb-api-core,
124-
# hyperdb-api-node, hyperdb-api-salesforce, hyperdb-bootstrap,
125-
# hyperdb-mcp, sea-query-hyperdb) and touches no external dep
126-
# rows. The "Verify lockfile diff is workspace-only" sentinel
127-
# below catches it if a future cargo version diverges.
124+
# hyperdb-api-derive, hyperdb-api-node, hyperdb-api-salesforce,
125+
# hyperdb-bootstrap, hyperdb-mcp, sea-query-hyperdb) and touches
126+
# no external dep rows. The "Verify lockfile diff is workspace-
127+
# only" sentinel below catches it if a future cargo version
128+
# diverges.
128129
#
129130
# Why not `cargo generate-lockfile`: it does a full re-resolve
130131
# and bumps unrelated transitive deps to their latest semver

‎.github/workflows/release.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,18 @@ jobs:
207207
# window for small crates.
208208
sleep 45
209209
}
210+
# Publish order is dependency-topological:
211+
# - hyperdb-api-salesforce, hyperdb-api-derive: leaves (no
212+
# workspace deps).
213+
# - hyperdb-api-core: depends on hyperdb-api-salesforce
214+
# (optional, via salesforce-auth feature).
215+
# - hyperdb-api: depends on hyperdb-api-core AND
216+
# hyperdb-api-derive (=X.Y.Z strict pin → derive must be
217+
# on the index when hyperdb-api builds).
218+
# - hyperdb-mcp, hyperdb-bootstrap, sea-query-hyperdb: depend
219+
# on hyperdb-api / hyperdb-api-core; publish last.
210220
publish hyperdb-api-salesforce
221+
publish hyperdb-api-derive
211222
publish hyperdb-api-core
212223
publish hyperdb-api
213224
publish hyperdb-mcp

‎hyperdb-api/src/lib.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
//! - `hyperdb-api` — High-level API (this crate)
1717
//!
1818
//! Optional companion crates:
19-
//! - `sea-query-hyper` — `HyperDB` SQL dialect backend for `sea-query`
19+
//! - `sea-query-hyperdb` — `HyperDB` SQL dialect backend for `sea-query`
2020
//! - `hyperdb-api-salesforce` — Salesforce Data Cloud OAuth authentication
21+
//! - `hyperdb-api-derive` — Proc-macro `#[derive(FromRow)]` (re-exported by this crate)
2122
//!
2223
//! # Quick Start
2324
//!

0 commit comments

Comments
 (0)