From 98ce6cbe54ec7913f3458f6ffc25dd9000943c54 Mon Sep 17 00:00:00 2001 From: Stefan Steiner Date: Thu, 28 May 2026 14:31:20 -0700 Subject: [PATCH 1/2] feat: stabilize v0.3.0 public API bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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. --- hyperdb-api/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hyperdb-api/src/lib.rs b/hyperdb-api/src/lib.rs index b4fd2e4..61db222 100644 --- a/hyperdb-api/src/lib.rs +++ b/hyperdb-api/src/lib.rs @@ -16,8 +16,9 @@ //! - `hyperdb-api` — High-level API (this crate) //! //! Optional companion crates: -//! - `sea-query-hyper` — `HyperDB` SQL dialect backend for `sea-query` +//! - `sea-query-hyperdb` — `HyperDB` SQL dialect backend for `sea-query` //! - `hyperdb-api-salesforce` — Salesforce Data Cloud OAuth authentication +//! - `hyperdb-api-derive` — Proc-macro `#[derive(FromRow)]` (re-exported by this crate) //! //! # Quick Start //! From ddd142ae8398799e0f3276afa08cb68b67c5f940 Mon Sep 17 00:00:00 2001 From: Stefan Steiner Date: Thu, 28 May 2026 14:58:05 -0700 Subject: [PATCH 2/2] 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. --- .github/workflows/ci.yml | 7 ++++--- .github/workflows/release-please.yml | 11 ++++++----- .github/workflows/release.yml | 11 +++++++++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24ca0fb..5f07dcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,7 +201,7 @@ jobs: # Catches Cargo.toml metadata regressions (missing license, bad # include paths, etc.) on the subset of crates that have no # workspace deps — those are the only ones `cargo publish --dry-run` - # can check before anything's on crates.io. The other 4 crates + # can check before anything's on crates.io. The other crates # (hyperdb-api-core, hyperdb-api-salesforce, hyperdb-api, hyperdb-mcp) # resolve their path+version deps against the live index, which can't # succeed until those deps are themselves published. (Note: @@ -223,8 +223,9 @@ jobs: cache-key: publish-dry-run rustflags: "" - run: | - cargo publish -p hyperdb-bootstrap --dry-run - cargo publish -p sea-query-hyperdb --dry-run + cargo publish -p hyperdb-bootstrap --dry-run + cargo publish -p sea-query-hyperdb --dry-run + cargo publish -p hyperdb-api-derive --dry-run deny: # Enforces license allowlist, advisory ignore list, and banned-source diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 8f0488a..e4d82b0 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -119,12 +119,13 @@ jobs: # `cargo metadata --format-version=1` forces a lockfile # reconciliation pass against the current Cargo.tomls. Empirically - # validated on this workspace: it flips exactly the 7 workspace- + # validated on this workspace: it flips exactly the 8 workspace- # member version rows (hyperdb-api, hyperdb-api-core, - # hyperdb-api-node, hyperdb-api-salesforce, hyperdb-bootstrap, - # hyperdb-mcp, sea-query-hyperdb) and touches no external dep - # rows. The "Verify lockfile diff is workspace-only" sentinel - # below catches it if a future cargo version diverges. + # hyperdb-api-derive, hyperdb-api-node, hyperdb-api-salesforce, + # hyperdb-bootstrap, hyperdb-mcp, sea-query-hyperdb) and touches + # no external dep rows. The "Verify lockfile diff is workspace- + # only" sentinel below catches it if a future cargo version + # diverges. # # Why not `cargo generate-lockfile`: it does a full re-resolve # and bumps unrelated transitive deps to their latest semver diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99e61fc..a36320d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -207,7 +207,18 @@ jobs: # window for small crates. sleep 45 } + # Publish order is dependency-topological: + # - hyperdb-api-salesforce, hyperdb-api-derive: leaves (no + # workspace deps). + # - hyperdb-api-core: depends on hyperdb-api-salesforce + # (optional, via salesforce-auth feature). + # - hyperdb-api: depends on hyperdb-api-core AND + # hyperdb-api-derive (=X.Y.Z strict pin → derive must be + # on the index when hyperdb-api builds). + # - hyperdb-mcp, hyperdb-bootstrap, sea-query-hyperdb: depend + # on hyperdb-api / hyperdb-api-core; publish last. publish hyperdb-api-salesforce + publish hyperdb-api-derive publish hyperdb-api-core publish hyperdb-api publish hyperdb-mcp