Split into esplora-types and esplora-client crates#229
Conversation
There was a problem hiding this comment.
Is the testenv specific to the esplora clients? If it isn't or doesn't have to be can it be shared somehow between the esplora-client and future mempoolspace-client tests? Don't need to change anything right now but something to think about for a future PR.
There was a problem hiding this comment.
Agreed testenv isn't Esplora-specific, and it'd make sense to share it once mempool-client gets its own tests. I'll factor that in when I open that PR.
notmandatory
left a comment
There was a problem hiding this comment.
This is very well explained and a good backward compatible design. I made one comment and CI has some failed tests. But otherwise looks good and ready to rebase once bitreq PR is merged.
Thanks for the review! I Dug into the failing Test jobs both panic at the same line ( |
Description
Addresses #218
Splits this repo into a Cargo workspace with two crates:
esplora-client(unchanged behavior --> the blocking/async HTTP clients, apart from one re-export line) and a newesplora-typescrate holding just the request/response types, depending only onserdeandbitcoin, with no HTTP stack at all.esplora-clientdepends onesplora-typesand re-exports it under both its top level and the existingapipath (pub use esplora_types as api;), so no downstream code needs to change imports.Notes to the reviewers
esplora-typeshere -> it's blocked on oneHashMapfield inSubmitPackageResult, and I didn't want to unilaterally pick between swapping to hashbrown or feature-gating it. Happy to follow up once there's agreement on direction.cargo-semver-checksflags theapire-export as a breaking removal dug into it, it's a known limitation with how rustdoc JSON representspub use other_crate as aliasre-exports, not a real break. Verified manually by compiling and running code through both the old and new import paths, including calling inherent methods through the old path.bitcoindevkit/bdkdoes it.bitreqwork merges I'll rebase this onto latest master.mempool-types/mempool-clientstacked on top of this one.Changelog notice
esplora-typescrate, re-exported asesplora_client::api