pub fn detect_cycle( root: &Path, item_id: &str, new_dep_id: &str, ) -> Result<Option<Vec<String>>, JoyError>
Check if adding a dependency would create a cycle. Returns the cycle path if one exists.