From 9d82f21a9a0a9392ac7577f4419a56fb94123ae6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 26 Jun 2026 02:31:34 +0900 Subject: fix(remove-command,pool-builder): drop Composer re-entrancy and PRE_POOL_CREATE todo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RemoveCommand::execute held composer_full_mut across deactivate_installed_plugins and event dispatch, both of which re-enter the same RefCell (composer.rs:500/446); it only uses &self getters, so borrow it immutably. PoolBuilder dispatched PluginEvents::PRE_POOL_CREATE by building an event that required moving the (unclonable) repositories/Request — left as todo!(). The event is purely plugin-facing and its result is never read in the no-plugin path (Pool::new reads self.packages directly), so skip it with a TODO(plugin) note. Removes the composer.rs re-entrancy and two todo!()s from the remove install path; remove's tests now reach the unregistered-installers blocker (factory.rs). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/remove_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/remove_command.rs') diff --git a/crates/shirabe/src/command/remove_command.rs b/crates/shirabe/src/command/remove_command.rs index d880ca0..c36c5dd 100644 --- a/crates/shirabe/src/command/remove_command.rs +++ b/crates/shirabe/src/command/remove_command.rs @@ -483,7 +483,7 @@ impl Command for RemoveCommand { // TODO(plugin): deactivate installed plugins if let Some(composer_opt) = self.try_composer(None, None) { - let mut composer_opt = crate::command::composer_full_mut(&composer_opt); + let composer_opt = crate::command::composer_full(&composer_opt); composer_opt .get_plugin_manager() .borrow_mut() @@ -492,7 +492,7 @@ impl Command for RemoveCommand { self.reset_composer(); let composer_handle = self.require_composer(None, None)?; - let mut composer = crate::command::composer_full_mut(&composer_handle); + let composer = crate::command::composer_full(&composer_handle); if dry_run { let root_package = composer.get_package(); -- cgit v1.3.1