From 971824aa15334fd12d08ae0f441f6bf6079344c3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 7 Jun 2026 10:33:53 +0900 Subject: feat(shirabe): resolve phase-b TODOs with shared ownership Replace TODO(phase-b) placeholders (todo!() and commented-out code) with real implementations: - Share JsonFile via Rc> so JsonConfigSource and the owning command can hold the same instance (base_config_command, config_command, repository_command, require_command, create_project, remove_command, factory) - Change InstallerInterface methods (is_installed, download, prepare, cleanup, get_install_path) to &mut self so initialize_vendor_dir can run, propagated to all installer implementations - Pass io/config/filesystem/process by clone instead of moving or stubbing (auth_helper, svn_driver, curl_downloader, library_installer) - Make TransportException Clone and store it by value in VcsRepository - Clone operations in Transaction sort, root_aliases/temporary_constraints in RepositorySet::create_pool, and share CompletePackage via handle in PlatformRepository - Wire up set_option, set_requires/set_dev_requires, installation manager setters, BumpCommand::set_composer, and clean_backups/set_local_phar --- crates/shirabe/src/installer/installer_interface.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/shirabe/src/installer/installer_interface.rs') diff --git a/crates/shirabe/src/installer/installer_interface.rs b/crates/shirabe/src/installer/installer_interface.rs index 20fdb2c..6df00c6 100644 --- a/crates/shirabe/src/installer/installer_interface.rs +++ b/crates/shirabe/src/installer/installer_interface.rs @@ -11,19 +11,19 @@ pub trait InstallerInterface: std::fmt::Debug { fn supports(&self, package_type: &str) -> bool; fn is_installed( - &self, + &mut self, repo: &dyn InstalledRepositoryInterface, package: PackageInterfaceHandle, ) -> bool; async fn download( - &self, + &mut self, package: PackageInterfaceHandle, prev_package: Option, ) -> anyhow::Result>; async fn prepare( - &self, + &mut self, r#type: &str, package: PackageInterfaceHandle, prev_package: Option, @@ -49,13 +49,13 @@ pub trait InstallerInterface: std::fmt::Debug { ) -> anyhow::Result>; async fn cleanup( - &self, + &mut self, r#type: &str, package: PackageInterfaceHandle, prev_package: Option, ) -> anyhow::Result>; - fn get_install_path(&self, package: PackageInterfaceHandle) -> Option; + fn get_install_path(&mut self, package: PackageInterfaceHandle) -> Option; fn as_binary_presence_interface(&mut self) -> Option<&mut dyn BinaryPresenceInterface> { None -- cgit v1.3.1