refactor: rename eventstore-macros to kurrentdb-macros#228
Conversation
The eventstore-macros crate name on crates.io is no longer under our control. Rename the internal proc-macro crate to kurrentdb-macros so we can publish it under a name we own. Reset the version to 0.0.1 since this is effectively a new crate on crates.io and update the publish workflow accordingly. Closes DEV-1680
Review Summary by QodoRename eventstore-macros to kurrentdb-macros for controlled crate publication
WalkthroughsDescription• Rename internal proc-macro crate from eventstore-macros to kurrentdb-macros • Update all import statements across 11 call-site files in kurrentdb • Reset version to 0.0.1 for new crate publication on crates.io • Update workspace configuration and CI publish workflow accordingly Diagramflowchart LR
A["eventstore-macros crate"] -->|rename| B["kurrentdb-macros crate"]
B -->|version reset| C["0.0.1"]
D["11 import statements"] -->|update| E["kurrentdb_macros imports"]
F["Cargo.toml configs"] -->|update| G["workspace & dependencies"]
H["publish-macros.yml"] -->|update| I["CI workflow"]
File Changes1. kurrentdb/src/operations/mod.rs
|
Code Review by Qodo
Context used✅ Tickets:
DEV-1680 1. Fragile version precheck
|
Switch the manual publish workflow from `rust-lang/crates-io-auth-action` (OIDC trusted publishing) to a `CARGO_REGISTRY_TOKEN` repository secret. The previous OIDC config was tied to an account we no longer have access to, so we publish under a different account using a plain API token.
Summary
eventstore-macros→kurrentdb-macrosso we can publish it under a name we control on crates.iokurrentdb's dependency line, alluse eventstore_macros::...imports across 11 call-site files, and the publish workflow0.0.1since this is effectively a new crate on crates.ioWhy
The
eventstore-macrosname on crates.io is no longer under our control, which blocks us from publishing new versions of the macro alongsidekurrentdbreleases. Rust requires proc-macros to live in a separate crate, so the simplest fix is renaming and keeping it as an internal workspace member.Considered (and rejected) rewriting
options!as amacro_rules!to fold it back intokurrentdb. That would eliminate the second published crate, but at the cost of API churn for ~25 call sites — not worth it just to avoid one extracargo publish.Closes DEV-1680
Test plan
cargo check --workspacepasses locallykurrentdb-macroson crates.io and run the manual publish workflow before the nextkurrentdbrelease