Skip to content

chore: rust dashcore made a workspace dependency #3062

Merged
lklimek merged 1 commit into
v3.1-devfrom
chore/rust-dashcore-workspace-dep
Feb 6, 2026
Merged

chore: rust dashcore made a workspace dependency #3062
lklimek merged 1 commit into
v3.1-devfrom
chore/rust-dashcore-workspace-dep

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

I dropped the python script since it was failing with dependencies that needed to be optional and replaced all of them with a rust workspace dependency, easier to manage and update them at the same time without having to maintain a python script

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

Release Notes

  • Chores
    • Consolidated external dependencies into workspace-managed references across packages for improved consistency and maintainability.
    • Reorganized dependency resolution to use workspace-based management, streamlining build configuration.
    • Removed legacy utility scripts associated with previous dependency management approaches.

@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request centralizes git-based dependency management by introducing a workspace-level dependencies section and updating four packages to reference these workspace dependencies instead of duplicating git URLs and revisions. The Python script that previously switched dependencies between local and git-based modes is deleted.

Changes

Cohort / File(s) Summary
Workspace dependency centralization
Cargo.toml
Adds [workspace.dependencies] section with six git-based dependencies (dashcore, dash-spv, dash-spv-ffi, key-wallet, key-wallet-manager, dashcore-rpc), all pointing to the same rust-dashcore repository revision.
Package manifest updates
packages/rs-dapi/Cargo.toml, packages/rs-dpp/Cargo.toml, packages/rs-platform-wallet/Cargo.toml, packages/rs-sdk-ffi/Cargo.toml
Each package replaces explicit git references and revisions with workspace = true for shared dependencies, while preserving feature flags and optional markers where applicable.
Utility script removal
scripts/dash_core_version_switcher.py
Deleted Python script that switched Cargo.toml dependencies between local filesystem paths and git-based references. Functionality is superseded by workspace dependency management.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Six dependencies bundled with care,
In workspace we store them, declared once, shared everywhere,
No more duplication in each package's call,
One source of truth now governs them all,
The switcher script bids its farewell goodbye,
As our build system reaches for the sky! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: rust dashcore made a workspace dependency' accurately and concisely summarizes the main change: converting rust-dashcore from external git dependencies to workspace-managed dependencies across multiple Cargo.toml files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/rust-dashcore-workspace-dep

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 and usage tips.

@lklimek

lklimek commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

great! please target v3.1-dev

@ZocoLini
ZocoLini changed the base branch from feat/iOSSupport to v3.1-dev February 6, 2026 14:26
@github-actions github-actions Bot added this to the v3.1.0 milestone Feb 6, 2026
@ZocoLini
ZocoLini force-pushed the chore/rust-dashcore-workspace-dep branch 2 times, most recently from c3bdd09 to a0b76d3 Compare February 6, 2026 14:47
@ZocoLini
ZocoLini force-pushed the chore/rust-dashcore-workspace-dep branch from a0b76d3 to b9cf80f Compare February 6, 2026 14:59
@xdustinface

Copy link
Copy Markdown
Contributor

@ZocoLini Not saying that we should keep it (at least not the way it is right now) but i think one good thing about the version switcher script was the local mode which changed all the dependencies to local paths easily for development. Any idea about how to make this easy again?

@ZocoLini

ZocoLini commented Feb 6, 2026

Copy link
Copy Markdown
Collaborator Author

@xdustinface you still can do that with the workspace, dashcore = { path = .... still woprks

@xdustinface

Copy link
Copy Markdown
Contributor

@xdustinface you still can do that with the workspace, dashcore = { path = .... still woprks

Yeah i know but now if you want to do it you need to put all paths manually, before you could just use the script :)

@ZocoLini

ZocoLini commented Feb 6, 2026

Copy link
Copy Markdown
Collaborator Author

mmm, all code editors let you find and replace one piece of text/regex in a selected region, you only have to write it once, and anyway, the script wasn't working bcs some dependencies need to be optional and the script was dropping the optional = true, you saw that i had to modify one Cargo.toml by hand after using the script in one of our calls

Conclusion:

  • All rust-dashcore dependencies in one place
  • No need to maintain a script and fix edge cases
  • Same functionality
  • have to write less if you know how to use find+replace in the CArgo.toml file
  • if you add a rust-dashcore dependency in a crate you just need to set workspace = true and everything will stay in sync with the repo, otherwise, you would need to add the new crate to the py script and manually test that everything works

@xdustinface

Copy link
Copy Markdown
Contributor

Im definitely in favour of this workspace dependencies changes.

the script wasn't working bcs some dependencies need to be optional and the script was dropping the optional = true, you saw that i had to modify one Cargo.toml by hand after using the script in one of our calls

Thats fixed by moving it to workspace dependencies though, isnt it? I think the script would be much simpler now if it gets adjusted to just change the workspace dependencies.

  • have to write less if you know how to use find+replace in the CArgo.toml file

Well the find+replace doesn't really work though if you consider that all crates will need a different path so switching between local and some specific commit/branch or the repo is probably a bit annoying when the script gets dropped.

I don't care that much since im at least so far not doing much with this repo but i think adjusting the script would be better than just dropping it.

@lklimek

lklimek commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

This one LGTM, we can get another PR for the script; however, I will not use it as it is much easier to edit one file than finding a script, understanding how it works etc.

@lklimek

lklimek commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Failed tests are not related, will be fixed in separate PR

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.

3 participants