From 294bd3dd425a374eda13a52b925a2cd0c4db7f0a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 21 Feb 2026 14:11:18 +0900 Subject: feat(depends): implement depends and prohibits commands with shared dependency logic Add the `depends` (why) and `prohibits` (why-not) commands that query the dependency graph to answer "which packages require X?" and "which packages prevent version Y of X from being installed?" respectively. Introduces the shared `dependency` module with package loading from lock file or installed.json, forward/inverted dependency graph walking, recursive traversal with cycle detection, and table/tree output formatters. Adds `conflict` field to LockedPackage for conflict-based prohibition detection, updating all struct literals across install, remove, require, and update test helpers. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/install.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/mozart/src/commands/install.rs') diff --git a/crates/mozart/src/commands/install.rs b/crates/mozart/src/commands/install.rs index c652569..ff53d1e 100644 --- a/crates/mozart/src/commands/install.rs +++ b/crates/mozart/src/commands/install.rs @@ -462,6 +462,7 @@ mod tests { dist: None, require: BTreeMap::new(), require_dev: BTreeMap::new(), + conflict: BTreeMap::new(), suggest: None, package_type: Some("library".to_string()), autoload: None, -- cgit v1.3.1