Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 54 additions & 63 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,45 @@ publish-check:
@printf "$(BLUE)ℹ Other crates cannot be fully validated until dependencies are published.$(NC)\n"
@printf "$(BLUE) Run 'make publish' to publish all crates in dependency order.$(NC)\n"

# Topological publish order over normal + build dependencies (issue #242).
# Verified against `cargo metadata`: every crate is listed after everything it
# depends on. Dev-dependencies are deliberately excluded from the ordering —
# they form cycles (aimdb-tokio-adapter <-> aimdb-uds-connector, and four more
# through aimdb-client), and every workspace-internal one is now path-only, so
# Cargo drops it from the packaged manifest.
PUBLISH_ORDER := \
aimdb-codegen \
aimdb-derive \
aimdb-core \
aimdb-data-contracts \
aimdb-embassy-adapter \
aimdb-persistence \
aimdb-tokio-adapter \
aimdb-uds-connector \
aimdb-knx-connector \
aimdb-mqtt-connector \
aimdb-persistence-sqlite \
aimdb-serial-connector \
aimdb-sync \
aimdb-tcp-connector \
aimdb-wasm-adapter \
aimdb-websocket-connector \
aimdb-client \
aimdb-cli \
aimdb-mcp

# Crates published without a verification build.
#
# `aimdb-embassy-adapter` needs embassy-sync's `poll_next_message` /
# `poll_changed`. Those are merged upstream but absent from the released 0.8.0,
# so the workspace supplies them through `[patch.crates-io]` (Cargo.toml).
# Patches are never published, and the vendored copy carries the same `0.8.0`
# version number as the registry release, so no version mismatch flags it: the
# packaged crate's `embassy-sync` feature cannot build for a downstream user
# until a release carries those APIs. Drop this entry — and the patch — once
# one does (issue #242).
PUBLISH_NO_VERIFY := aimdb-embassy-adapter aimdb-wasm-adapter

publish:
@printf "$(GREEN)Publishing AimDB crates to crates.io...$(NC)\n"
@printf "$(YELLOW)⚠ This will publish crates in dependency order$(NC)\n"
Expand All @@ -654,69 +693,21 @@ publish:
else \
printf "$(BLUE)Running in CI mode - skipping confirmation$(NC)\n"; \
fi
@printf "$(YELLOW) → Publishing aimdb-derive (1/16)$(NC)\n"
@cargo publish -p aimdb-derive
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-codegen (2/16)$(NC)\n"
@cargo publish -p aimdb-codegen
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-core (3/16)$(NC)\n"
@cargo publish -p aimdb-core
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-data-contracts (4/16)$(NC)\n"
@cargo publish -p aimdb-data-contracts
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-tokio-adapter (5/16)$(NC)\n"
@cargo publish -p aimdb-tokio-adapter
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-embassy-adapter (6/16)$(NC)\n"
@cargo publish -p aimdb-embassy-adapter --no-verify
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-client (7/16)$(NC)\n"
@cargo publish -p aimdb-client
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-sync (8/16)$(NC)\n"
@cargo publish -p aimdb-sync
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-persistence (9/16)$(NC)\n"
@cargo publish -p aimdb-persistence
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-persistence-sqlite (10/16)$(NC)\n"
@cargo publish -p aimdb-persistence-sqlite
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-mqtt-connector (11/16)$(NC)\n"
@cargo publish -p aimdb-mqtt-connector
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-knx-connector (12/16)$(NC)\n"
@cargo publish -p aimdb-knx-connector
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-websocket-connector (13/16)$(NC)\n"
@cargo publish -p aimdb-websocket-connector
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-wasm-adapter (14/16)$(NC)\n"
@cargo publish -p aimdb-wasm-adapter --no-verify
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-cli (15/16)$(NC)\n"
@cargo publish -p aimdb-cli
@printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"
@sleep 10
@printf "$(YELLOW) → Publishing aimdb-mcp (16/16)$(NC)\n"
@cargo publish -p aimdb-mcp
@printf "$(GREEN)✓ All 16 crates published successfully!$(NC)\n"
@total=$(words $(PUBLISH_ORDER)); i=0; \
for pkg in $(PUBLISH_ORDER); do \
i=$$((i + 1)); \
flags=""; \
case " $(PUBLISH_NO_VERIFY) " in \
*" $$pkg "*) flags="--no-verify";; \
esac; \
printf "$(YELLOW) → Publishing $$pkg ($$i/$$total)$(NC)\n"; \
cargo publish -p "$$pkg" $$flags || exit 1; \
if [ "$$i" -lt "$$total" ]; then \
printf "$(YELLOW) → Waiting 10s for crates.io propagation...$(NC)\n"; \
sleep 10; \
fi; \
done
@printf "$(GREEN)✓ All $(words $(PUBLISH_ORDER)) crates published successfully!$(NC)\n"
@printf "$(BLUE)🎉 AimDB v$(shell grep '^version' Cargo.toml | head -1 | cut -d '"' -f 2) is now live on crates.io!$(NC)\n"

## Drift guards
Expand Down
2 changes: 1 addition & 1 deletion aimdb-embassy-adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tracing = { workspace = true, optional = true, default-features = false }
# `run_client` engine on the EmbassyAdapter clock — pull in aimdb-core's
# `connector-session` gate. Dev-only, so the normal no_std lib build (and the
# thumbv7em checks) stay `alloc`-only.
aimdb-core = { version = "1.1.0", path = "../aimdb-core", default-features = false, features = [
aimdb-core = { path = "../aimdb-core", default-features = false, features = [
"alloc",
"connector-session",
] }
Expand Down
4 changes: 2 additions & 2 deletions aimdb-tokio-adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ tokio-test = { workspace = true }
futures = { workspace = true }

# For drain integration tests
aimdb-client = { version = "0.6.0", path = "../aimdb-client" }
aimdb-client = { path = "../aimdb-client" }
# Stands up the AimX UDS server (`UdsServer`) the drain tests connect to.
aimdb-uds-connector = { version = "0.1.0", path = "../aimdb-uds-connector" }
aimdb-uds-connector = { path = "../aimdb-uds-connector" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
2 changes: 1 addition & 1 deletion aimdb-uds-connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tokio = { version = "1", features = ["net", "io-util"] }


[dev-dependencies]
aimdb-tokio-adapter = { version = "0.6.0", path = "../aimdb-tokio-adapter" }
aimdb-tokio-adapter = { path = "../aimdb-tokio-adapter" }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
# For the crate-level doc example (a mirrored record needs a JSON shape)
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion aimdb-websocket-connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tracing = { version = "0.1", optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
tokio-tungstenite = "0.26"
aimdb-tokio-adapter = { version = "0.6.0", path = "../aimdb-tokio-adapter" }
aimdb-tokio-adapter = { path = "../aimdb-tokio-adapter" }

# Runnable demos — see their headers for the two-terminal workflow.
[[example]]
Expand Down
1 change: 1 addition & 0 deletions examples/remote-access-demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "remote-access-demo"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false

[[bin]]
name = "server"
Expand Down
Loading