aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer/plugin_installer.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 00:10:22 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 00:11:03 +0900
commitc839244d8d09f3036ebfee8eef7eb6b147e593ab (patch)
treefe48c94f2c2e62468beef5ff1a8f3cff6adeef4f /crates/shirabe/src/installer/plugin_installer.rs
parent48839250146b217e2756ed3c0e624fd341b54d6c (diff)
downloadphp-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.gz
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.zst
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.zip
fix(compile): fix various compile errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/installer/plugin_installer.rs')
-rw-r--r--crates/shirabe/src/installer/plugin_installer.rs19
1 files changed, 12 insertions, 7 deletions
diff --git a/crates/shirabe/src/installer/plugin_installer.rs b/crates/shirabe/src/installer/plugin_installer.rs
index 1fd2334..77bd669 100644
--- a/crates/shirabe/src/installer/plugin_installer.rs
+++ b/crates/shirabe/src/installer/plugin_installer.rs
@@ -37,13 +37,13 @@ impl PluginInstaller {
}
}
- pub fn disable_plugins(&self) {
+ pub fn disable_plugins(&mut self) {
// TODO(plugin): disable plugins via plugin manager
- self.get_plugin_manager().disable_plugins();
+ self.get_plugin_manager_mut().disable_plugins();
}
fn rollback_install(
- &self,
+ &mut self,
e: anyhow::Error,
repo: &mut dyn InstalledRepositoryInterface,
package: &dyn PackageInterface,
@@ -71,6 +71,11 @@ impl PluginInstaller {
// TODO(plugin): return plugin manager from composer
self.inner.composer.get_plugin_manager()
}
+
+ fn get_plugin_manager_mut(&mut self) -> &mut PluginManager {
+ // TODO(plugin): return mutable plugin manager from composer
+ todo!()
+ }
}
impl InstallerInterface for PluginInstaller {
@@ -129,7 +134,7 @@ impl InstallerInterface for PluginInstaller {
}
fn install(
- &self,
+ &mut self,
repo: &mut dyn InstalledRepositoryInterface,
package: &dyn PackageInterface,
) -> Result<Option<Box<dyn PromiseInterface>>> {
@@ -149,7 +154,7 @@ impl InstallerInterface for PluginInstaller {
}
fn update(
- &self,
+ &mut self,
repo: &mut dyn InstalledRepositoryInterface,
initial: &dyn PackageInterface,
target: &dyn PackageInterface,
@@ -171,12 +176,12 @@ impl InstallerInterface for PluginInstaller {
}
fn uninstall(
- &self,
+ &mut self,
repo: &mut dyn InstalledRepositoryInterface,
package: &dyn PackageInterface,
) -> Result<Option<Box<dyn PromiseInterface>>> {
// TODO(plugin): uninstall package from plugin manager
- self.get_plugin_manager().uninstall_package(package);
+ self.get_plugin_manager_mut().uninstall_package(package);
self.inner.uninstall(repo, package)
}