Skip to content

No workspace.dependencies] for shared crate versions#457

Merged
Junman140 merged 3 commits into
Pi-Defi-world:devfrom
githoboman:No-`-workspace.dependencies]`-for-shared-crate-versions
Jun 29, 2026
Merged

No workspace.dependencies] for shared crate versions#457
Junman140 merged 3 commits into
Pi-Defi-world:devfrom
githoboman:No-`-workspace.dependencies]`-for-shared-crate-versions

Conversation

@githoboman

@githoboman githoboman commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Closes #386
What changed
Cargo.toml — added a [workspace.dependencies] table pinning soroban-sdk = "21.0.0" once, as the single source of truth (with a comment explaining the ABI-compatibility rationale).
All 9 members now inherit it via soroban-sdk = { workspace = true } instead of pinning their own "21.0.0":
shared + 7 contracts → { workspace = true } and { workspace = true, features = ["testutils"] } for dev-deps.
acbu_multisig/Cargo.toml keeps its alloc feature: { workspace = true, features = ["alloc"] }.
Per-crate feature flags stay where they belong (member level); only the version is unified. From now on a single bump in the root table moves every contract together, so cross-contract calls stay ABI-compatible.

Verification
cargo metadata — resolves cleanly (exit 0).
Cargo.lock — single resolved soroban-sdk (21.7.7).
cargo check --workspace --lib — Finished successfully; all contract libraries compile against the unified dependency.
One thing to flag (pre-existing, not mine)
cargo check --all-targets surfaced a compile error in acbu_minting/tests/test.rs:629-630 — the test_storage_state_intact_across_upgrade_boundary test has two dangling lines (&tx_id, and );) with no matching function call, an unclosed-delimiter error. This is leftover from a bad edit and is unrelated to the dependency change (my diff touches only Cargo.toml files). Want me to fix that broken test as well?

Summary by CodeRabbit

  • Chores
    • Centralized shared dependency versions across the workspace for more consistent builds.
    • Updated all crates to use the workspace-managed Soroban SDK, including test tooling where needed.
    • Added local development watch/restart settings for the TypeScript app.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a [workspace.dependencies] section to the root Cargo.toml pinning soroban-sdk = "21.0.0", then migrates all member crates (shared, acbu_burning, acbu_escrow, acbu_lending_pool, acbu_minting, acbu_multisig, acbu_oracle, acbu_reserve_tracker, acbu_savings_vault) to reference it via workspace = true. A nodemon.json file is also added for TypeScript development tooling.

Changes

Workspace soroban-sdk centralization

Layer / File(s) Summary
Root workspace pin and member migrations
Cargo.toml, shared/Cargo.toml, acbu_*/Cargo.toml
Root gains [workspace.dependencies] with soroban-sdk = "21.0.0"; all member crates replace pinned version strings with { workspace = true } in both [dependencies] and [dev-dependencies], preserving existing feature flags.

nodemon configuration

Layer / File(s) Summary
nodemon.json
nodemon.json
New file configuring nodemon to watch src for ts/js/json changes, ignore dist/node_modules, and restart via ts-node src/index.ts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 One version to rule them all,
In workspace TOML it sits so small,
Each crate says "workspace = true" with glee,
No more pinning separately!
The rabbit hops, the deps agree. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title refers to the workspace dependency refactor, which matches the main change in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Junman140 Junman140 merged commit b98a67d into Pi-Defi-world:dev Jun 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No [workspace.dependencies] for shared crate versions

2 participants