@smbcloud / cli / commits / 9aa66e5

Add ADR for workspace dependency inheritance and remove old doc

Seto Elkahfi committed Mar 29, 2026 at 15:06 UTC 9aa66e54d5408118995abe3b471417e196cc591e
2 files changed +33 -7
adr/0001-dependency-inheritance.md new
+33
@@ -0,0 +1,33 @@
1 +# ADR 0001: Dependency Inheritance
2 +
3 +- Status: Accepted
4 +- Date: 2025-04-19
5 +
6 +## Context
7 +
8 +The smbcloud-cli workspace contains multiple crates that share a large set of common dependencies.
9 +Without a workspace-level dependency strategy, individual `Cargo.toml` files repeat the same
10 +version declarations and features, which increases maintenance cost and creates version drift.
11 +
12 +## Decision
13 +
14 +We use Cargo workspace dependency inheritance for shared dependencies.
15 +
16 +The workspace defines common dependencies in `[workspace.dependencies]`, and member crates inherit
17 +those dependencies instead of repeating version declarations locally.
18 +
19 +We use `cargo autoinherit` to apply and maintain this inheritance pattern.
20 +
21 +Reference:
22 +- https://mainmatter.com/blog/2024/03/18/cargo-autoinherit
23 +
24 +## Consequences
25 +
26 +Positive:
27 +- Shared dependency versions are managed in one place.
28 +- Workspace manifests are easier to keep consistent.
29 +- Upgrades are simpler because most dependency changes happen at the workspace root.
30 +
31 +Tradeoffs:
32 +- Contributors need to understand workspace inheritance when editing crate manifests.
33 +- Tooling and review need to account for inherited dependencies instead of crate-local versions.
adr/19042025.md deleted
-7
@@ -1,7 +0,0 @@
1 -# Dependency Inheritance
2 -
3 -Dependency inheritance cleans up cargo workspace setup by specifying single dependency table and let workspace members inherit it.
4 -
5 -We use a `cargo autoinherit` to do dependency inheritance.
6 -
7 -[Read more](https://mainmatter.com/blog/2024/03/18/cargo-autoinherit).
\ No newline at end of file