Skip to content

Commit 677edf4

Browse files
authored
Break circular dependency between soroban-sdk and soroban-token-sdk. (#1558)
### What Break circular dependency between soroban-sdk and soroban-token-sdk. We only introduced it in order to be able to run the doctest in migration guide soroban-sdk. I've moved the migration guide to the respective crate (soroban-token-sdk). This may slightly reduce discoverability, but I've left a reference to it in the main SDK migration guide. ### Why It's apparently impossible to publish crates with circular dependency between them, even the dependency only occurs in dev-dependencies (or at least I wasn't able to quickly find a way around that). ### Known limitations N/A
1 parent d37587a commit 677edf4

File tree

7 files changed

+13
-4
lines changed

7 files changed

+13
-4
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

soroban-sdk/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ soroban-env-host = { workspace = true, features = ["testutils"] }
4646
soroban-ledger-snapshot = { workspace = true, features = ["testutils"] }
4747
stellar-xdr = { workspace = true, features = ["curr", "std"] }
4848
soroban-spec = { workspace = true }
49-
soroban-token-sdk = { workspace = true }
5049
ed25519-dalek = "2.0.0"
5150
rand = "0.8.5"
5251
ctor = "0.2.9"

soroban-sdk/src/_migrating.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
//!
33
//! 1. [`contractevent` replaces `Events::publish`][v23_contractevent]
44
//!
5-
//! 2. [`MuxedAddress` replaces `Address` as the `to` of the `TokenInterface::transfer`][v23_token_transfer]
5+
//! 2. [`MuxedAddress` replaces `Address` as the `to` of the `TokenInterface::transfer`].
6+
//! This change concerns `soroban-token-sdk` and is documented in detail in
7+
//! `soroban-token-sdk` crate migration guide.
68
//!
79
//! # Migrating from v21 to v22
810
//!
@@ -242,4 +244,3 @@
242244
//! [`Hash<32>::to_bytes`]: crate::crypto::Hash::to_bytes
243245
244246
pub mod v23_contractevent;
245-
pub mod v23_token_transfer;

soroban-token-sdk/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ rust-version.workspace = true
1313
[lib]
1414
doctest = false
1515

16+
[features]
17+
docs = []
18+
1619
[dependencies]
1720
soroban-sdk = { workspace = true }
1821

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//! # Migrating from v22 to v23
2+
//!
3+
//! 1. [`MuxedAddress` replaces `Address` as the `to` of the `TokenInterface::transfer`][v23_token_transfer]
4+
5+
pub mod v23_token_transfer;
File renamed without changes.

soroban-token-sdk/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#![no_std]
2+
#![cfg_attr(feature = "docs", feature(doc_cfg))]
3+
pub mod _migrating;
24

35
use crate::event::Events;
46
use crate::metadata::Metadata;

0 commit comments

Comments
 (0)