Commit Graph
4 Commits
Author SHA1 Message Date
faumarayandClaude Opus 4.8 f7553d10d3 Own the event bus in Core; inject it into MusicManager
Core holds a Void::EventBus::EventBus (Async), provides it as a service, and
runs its 18 event subscriptions against it directly (setupEventBusSubscriptions
is no longer const since it now mutates the owned bus). MusicManager gets the
bus via setEventBus() and publishes through a small emit<T>() helper (14
former GlobalEventBus publish sites). Delete EventBus.cpp (the singleton
definition). Build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 13:56:32 +03:00
faumarayandClaude Opus 4.8 32fbffa171 Introduce a service registry as Core's composition root
Add Void::Service::ServiceRegistry to Core. initialize() now registers every
service by interface — ILogger, ConfigManager, EventBus, INetworkClient,
Database, MusicManager, RpcServer — so code can resolve them via
Core::services().require<I>() instead of reaching for global singletons. The
three former singletons (logger/config/event bus) are wrapped in non-owning
aliasing shared_ptrs and remain valid behind the ECHOION_LOG_*/PUBLISH/
SUBSCRIBE macros; the registry just makes them discoverable as services.

This establishes the DI backbone; migrating individual call sites to
registry resolution is intentionally incremental. Requires the VoidLibrary
fix allowing non-polymorphic service types in provide<I>. Link Void::Service.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:00:31 +03:00
faumaray 2bdb63766d Migrate core infrastructure to VoidLibrary 2026-06-22 15:53:23 +03:00
faumaray a583c17916 Initial commit 2026-02-01 23:04:49 +03:00