From 86961b16b2f5c9c26a776193934d13ff87ab7fea Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 7 Jun 2026 13:37:11 +0900 Subject: refactor(phase-c): resolve shared-ownership TODOs via handle/Rc clones Resolve the resolvable subset of category A (shared ownership / non-cloneable PHP class) TODOs by leaning on values that are already shared behind Rc/handle wrappers, where cloning preserves PHP reference semantics: - solver: call IgnoreListPlatformRequirementFilter::filter_constraint with a cloned AnyConstraint (a Clone enum) and propagate the Result - update_command: filter PlatformRepository out of the repository manager's handles into a CompositeRepository (array_filter equivalent) - package_discovery_trait: pass the real platform_requirement_filter (Rc clone) instead of substituting ignore_nothing() - installation_manager: pass the original full operation list (Vec> clone) as all_operations - file_downloader: swap self.io to NullIO and restore via std::mem::replace - auditor: reuse the PackageInterfaceHandle list across the advisory and abandoned-package queries - process_executor: drop the unused, lossy Clone impl - config / array_repository: demote settled RefCell-design markers to comments Remaining category A items (factory installer wiring, purge_packages handle bridge, installer cache identity, reinstall flow, plugin command discovery) stay as TODOs since correct resolution needs structural refactors. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/process_executor.rs | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'crates/shirabe/src/util') diff --git a/crates/shirabe/src/util/process_executor.rs b/crates/shirabe/src/util/process_executor.rs index 36025ea..0b88b9f 100644 --- a/crates/shirabe/src/util/process_executor.rs +++ b/crates/shirabe/src/util/process_executor.rs @@ -850,23 +850,6 @@ impl ProcessExecutor { } } -impl Clone for ProcessExecutor { - fn clone(&self) -> Self { - // TODO(phase-b): cloning ProcessExecutor is incidental to Phase A — share state - // properly in a Phase B refactor - Self { - capture_output: self.capture_output, - error_output: self.error_output.clone(), - io: None, - jobs: IndexMap::new(), - running_jobs: 0, - max_jobs: self.max_jobs, - id_gen: 0, - allow_async: self.allow_async, - } - } -} - /// Phase B helper trait: convert various command argument forms into `PhpMixed`. pub trait IntoExecCommand { fn into_exec_command(self) -> PhpMixed; -- cgit v1.3.1