Skip to content

chore: centralise shared dependencies in the workspace manifest - #69

Merged
codemagician1949 merged 1 commit into
IntensifierLab:mainfrom
definurse13:chore/7-workspace-shared-dependencies
Aug 25, 2026
Merged

codemagician1949 merged 1 commit into
IntensifierLab:mainfrom
definurse13:chore/7-workspace-shared-dependencies

Conversation

@definurse13

Copy link
Copy Markdown
Contributor

Closes #7

soroban-sdk was already inherited, but everything else was restated per crate — so keeping the four contracts in step depended on remembering to edit five files. This moves the rest to the workspace root.

[workspace.package]

Now carries version, edition and rust-version, with each crate inheriting via <field>.workspace = true.

Bumping the MSRV or moving to a new edition is one edit rather than five, and the contracts can no longer drift onto different editions without somebody actively deciding to.

[workspace.dependencies]

Gains:

  • ed25519-dalek and rand, previously pinned only inside invoice-registry. invoice-registry still declares the rand_core feature locally — the feature is specific to how that crate uses the dependency, while the version is not. That split is the point: versions centralise, features stay where they are used.
  • The three intra-workspace path dependencies. A crate taking on a sibling no longer restates the relative path, and the root package's dev-dependencies stop being a second place those paths are written down.

The check that matters: Cargo.lock is unchanged

Nothing in this PR alters the resolved dependency graph. The lockfile is byte-identical, which is the evidence that this is purely a change in where versions are written down and not a change to what gets compiled. A refactor of this kind that quietly moved a version would be much worse than not doing it at all.

I also verified the actual goal rather than assuming it: editing soroban-sdk in [workspace.dependencies] alone does move all four contracts together.

Acceptance criteria

  • soroban-sdk and common deps in workspace
  • All crates reference workspace versions
  • Single bump updates all

Verification

cargo check --workspace, cargo test --workspace, and cargo build --release --target wasm32-unknown-unknown --workspace all pass.

This PR and #3 are conflict-free in either merge order. They touch disjoint file sets by construction — this one only Cargo.toml files, #3 only .rs files. I merged them both ways locally against main to confirm rather than assume: zero conflicts each way, both orders produce an identical tree, and the merged result passes the full gate. Whichever you merge first, the other needs no rebase.

soroban-sdk was already inherited, but everything else was restated per
crate, so keeping the four contracts in step depended on remembering to
edit five files. This moves the rest to the workspace root.

[workspace.package] now carries version, edition and rust-version, and
each crate inherits them with `<field>.workspace = true`. Bumping the
MSRV or moving to a new edition is one edit rather than five, and the
contracts can no longer drift onto different editions without somebody
deciding to.

[workspace.dependencies] gains:

- ed25519-dalek and rand, previously pinned only inside
  invoice-registry. invoice-registry still declares the rand_core
  feature locally, since the feature is specific to how that crate uses
  the dependency while the version is not.
- The three intra-workspace path dependencies. A crate that takes on a
  sibling no longer restates the relative path, and the root package's
  dev-dependencies stop being a second place where those paths live.

Cargo.lock is unchanged by this commit, which is the check that matters:
the resolved dependency graph is identical, so this is purely a change
in where the versions are written down and not a change to what gets
compiled.

Verified that a single bump propagates - editing soroban-sdk in
[workspace.dependencies] alone moves all four contracts together, which
was the point of the issue.

Closes IntensifierLab#7
@codemagician1949

Copy link
Copy Markdown
Contributor

Nice job @definurse13

@codemagician1949
codemagician1949 merged commit f875e05 into IntensifierLab:main Aug 25, 2026
3 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.

chore: add workspace-level Cargo.toml shared dependencies

2 participants