From 436e12381dd79e419dce755718be17b66d73e17f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 9 Jun 2026 00:09:08 +0900 Subject: feat(event-dispatcher): unify event dispatch via EventInterface trait Extract a superclass-trait EventInterface from the base Event. pool_builder's PrePoolCreateEvent stays deferred: its constructor needs owned, non-cloneable Request and repository boxes the builder only holds by reference (owned-payload blocker). The event is plugin-only, so its construction is re-tagged TODO(plugin). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/factory.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/factory.rs') diff --git a/crates/shirabe/src/factory.rs b/crates/shirabe/src/factory.rs index e0eb42c..101e4cd 100644 --- a/crates/shirabe/src/factory.rs +++ b/crates/shirabe/src/factory.rs @@ -844,12 +844,12 @@ impl Factory { if full_load { // The back-reference is now upgradeable, so dispatching the INIT event (which may read // the Composer through the dispatcher) is safe only after the Rc has been constructed. - let init_event = Event::from_name(PluginEvents::INIT.to_string()); + let mut init_event = Event::from_name(PluginEvents::INIT.to_string()); let init_event_name = init_event.get_name().to_string(); let dispatcher = composer.borrow().get_event_dispatcher(); dispatcher .borrow_mut() - .dispatch(Some(&init_event_name), Some(init_event))?; + .dispatch(Some(&init_event_name), Some(&mut init_event))?; // once everything is initialized we can // purge packages from local repos if they have been deleted on the filesystem -- cgit v1.3.1