Skip to content

Commit e6814f1

Browse files
chore(release): correct publish order — derive after compile-check (#102)
The publish order had hyperdb-api-derive at position 3, before hyperdb-compile-check. But hyperdb-api-derive has an optional dep `hyperdb-compile-check = "=0.4.0"`, and cargo publish resolves optional deps against the live crates.io index during packaging — so it failed with `no matching package named hyperdb-compile-check`. Derived the correct topological order from the version-pinned sibling edges (path-only deps impose no ordering and are not registry-checked): core → salesforce api → core compile-check → api derive → compile-check mcp → api => salesforce → core → api → compile-check → derive → mcp → bootstrap → sea-query Moves `publish hyperdb-api-derive` to after the hyperdb-compile-check block. This is a pure reordering; no Cargo.toml changes. The 'already exists' guard skips the already-published salesforce + core crates on re-run.
1 parent 2e5e1d3 commit e6814f1

1 file changed

Lines changed: 26 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -218,29 +218,34 @@ jobs:
218218
# window for small crates.
219219
sleep 45
220220
}
221-
# Publish order is dependency-topological:
222-
# - hyperdb-api-salesforce, hyperdb-api-derive: leaves (no
223-
# workspace deps).
224-
# - hyperdb-api-core: depends on hyperdb-api-salesforce
225-
# (optional, via salesforce-auth feature).
226-
# Publish order (strict dependency chain):
227-
# hyperdb-api-salesforce: no sibling runtime deps
228-
# hyperdb-api-core: optional runtime dep on hyperdb-api-salesforce
229-
# hyperdb-api-derive: optional runtime dep on hyperdb-compile-check
230-
# (path-only dev-dep on hyperdb-api — no crates.io check needed)
231-
# hyperdb-api: runtime dep on hyperdb-api-core
232-
# (path-only dev-dep on hyperdb-api-derive — no crates.io check)
233-
# hyperdb-compile-check: runtime dep on hyperdb-api; outside the
234-
# workspace (avoids dep cycle) — uses --manifest-path.
235-
# Must come AFTER hyperdb-api-derive (which it optionally
236-
# depends on) and AFTER hyperdb-api (which it depends on).
237-
# hyperdb-mcp, hyperdb-bootstrap, sea-query-hyperdb: last.
221+
# Publish order — strict topological sort of the version-pinned
222+
# sibling deps. `cargo publish` resolves EVERY sibling dep that
223+
# carries a version requirement against the live crates.io index
224+
# (in any section, including [dev-dependencies] and optional deps),
225+
# so each crate must be published only after the crates it pins are
226+
# already on the index. Path-only deps (no `version = `) are resolved
227+
# locally and impose no ordering — that's why hyperdb-api's dev-dep on
228+
# hyperdb-api-derive (and vice-versa) is path-only, which is what lets
229+
# this be a DAG rather than a cycle.
230+
#
231+
# Version-pinned sibling edges (X needs Y published first):
232+
# hyperdb-api-core → hyperdb-api-salesforce (optional)
233+
# hyperdb-api → hyperdb-api-core
234+
# hyperdb-compile-check → hyperdb-api
235+
# hyperdb-api-derive → hyperdb-compile-check (optional)
236+
# hyperdb-mcp → hyperdb-api
237+
# (hyperdb-api-salesforce, hyperdb-bootstrap, sea-query-hyperdb:
238+
# no version-pinned sibling deps)
239+
#
240+
# Resulting order:
241+
# salesforce → core → api → compile-check → derive → mcp
242+
# → bootstrap → sea-query
238243
publish hyperdb-api-salesforce
239244
publish hyperdb-api-core
240-
publish hyperdb-api-derive
241245
publish hyperdb-api
242246
# hyperdb-compile-check depends on hyperdb-api (runtime) and is outside
243247
# the workspace; publish via manifest path after hyperdb-api is indexed.
248+
# Must come BEFORE hyperdb-api-derive, which optionally depends on it.
244249
echo "::group::Publishing hyperdb-compile-check"
245250
if ! cargo publish --manifest-path hyperdb-compile-check/Cargo.toml 2>&1 | tee /tmp/publish_out; then
246251
if grep -q "already exists on" /tmp/publish_out; then
@@ -252,6 +257,9 @@ jobs:
252257
fi
253258
echo "::endgroup::"
254259
sleep 45
260+
# hyperdb-api-derive optionally depends on hyperdb-compile-check (now
261+
# indexed above), so it must publish after it.
262+
publish hyperdb-api-derive
255263
publish hyperdb-mcp
256264
publish hyperdb-bootstrap
257265
publish sea-query-hyperdb

0 commit comments

Comments
 (0)