Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes dependency management by moving shared dependency declarations from individual crate Cargo.toml files to workspace-level dependency management in the root Cargo.toml. This improves maintainability by ensuring consistent versions across all crates.
Changes:
- Added 13 commonly-used dependencies to workspace.dependencies in root Cargo.toml (serde family, base64, url, uuid, convert_case, rmp family)
- Updated 8 crate Cargo.toml files to reference workspace dependencies
- Updated OAS generator template to use workspace dependencies
- Upgraded base64 from 0.21 to 0.22.1 in algokit_abi
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Added workspace-level dependency declarations for 13 shared dependencies |
| crates/kmd_client/Cargo.toml | Migrated serde family, url, base64, and uuid to workspace dependencies |
| crates/indexer_client/Cargo.toml | Migrated serde family, url, base64, and uuid to workspace dependencies |
| crates/ffi_macros/Cargo.toml | Migrated convert_case to workspace dependencies |
| crates/algokit_transact_ffi/Cargo.toml | Migrated serde family, rmp-serde, and base64 to workspace dependencies |
| crates/algokit_transact/Cargo.toml | Migrated multiple dependencies (base64, convert_case, rmp family, serde family, snafu) to workspace |
| crates/algokit_http_client/Cargo.toml | Migrated serde to workspace dependencies |
| crates/algokit_abi/Cargo.toml | Migrated serde, serde_json, and base64 to workspace (with version upgrade to 0.22.1) |
| crates/algod_client/Cargo.toml | Migrated serde family, url, base64, uuid, and rmp family to workspace dependencies |
| api/oas_generator/rust_oas_generator/templates/base/Cargo.toml.j2 | Updated template to use workspace dependencies |
| Cargo.lock | Reflects base64 version upgrade for algokit_abi from 0.21.7 to 0.22.1 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -15,11 +15,11 @@ algokit_transact = { path = "../algokit_transact", features = ['test_utils'] } | |||
| ffi_macros = { path = "../ffi_macros" } | |||
|
|
|||
| snafu = "0.8" | |||
There was a problem hiding this comment.
The snafu dependency should be changed to use workspace inheritance for consistency with other crates. All other crates in this PR use snafu = { workspace = true }, but this file still has snafu = "0.8". This inconsistency makes it harder to manage the snafu version across the workspace.
| @@ -37,7 +37,7 @@ uniffi = { workspace = true, features = [ | |||
| algokit_transact = { path = "../algokit_transact", features = ['test_utils'] } | |||
| ffi_macros = { path = "../ffi_macros" } | |||
| snafu = "0.8" | |||
There was a problem hiding this comment.
The snafu dependency in build-dependencies should also be changed to use workspace inheritance for consistency with other crates. This is the same issue as in the [dependencies] section - all other crates use snafu = { workspace = true }.
| base64 = "0.21" | ||
| serde = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| base64 = { workspace = true } |
There was a problem hiding this comment.
This change upgrades base64 from version 0.21 to 0.22.1. While this aligns with the base64 0.22 API already used in the code (Engine trait and general_purpose), this version upgrade should be explicitly mentioned in the PR description since it goes beyond just "moving deps to workspace". The base64 0.22 release included breaking API changes, so this upgrade should be intentional and tested.
| base64 = { workspace = true } | |
| base64 = "0.22.1" |
This makes it easier to manage deps that are used across multiple crates