PAR-276
[business] Plugin fails to enable: Carbon soft-dep not actually soft + HelpCommands circular DI
Business failed to enable at startup with two distinct DI faults:
-
CarbonChat soft-dependency wasn't soft.
FirmChatServicedeclaredCarbonChat/FirmChatChannel-typed fields and aChatChannelmethod param. Guice scans a class's declared members at injector-build time, so that reflection threwNoClassDefFoundError: net/draycia/carbon/api/channels/ChatChannelwhen CarbonChat wasn't installed — failing the whole injector beforeinitialise()could soft-disable the feature. Fix: type those members asObject(cast inside the guarded method bodies, which only run when Carbon is present), so the class is reflectable without Carbon on the classpath. -
Circular dependency.
HelpCommandsinjectedCommandManagerdirectly;CommandManagerinjects theSet<CommandHandler>(which includesHelpCommands), so Guice tried to proxy the concreteCommandManagerand failed (CanNotProxyClass). Fix: injectProvider<CommandManager>and resolve at render time — the pattern Treasury's commands already use.
Verified: Business now enables; firm chat soft-disables cleanly when CarbonChat is absent.
Resources
- commit17c3184 Fix Business enable: decouple Carbon soft-dep + break HelpCommands DI cycle (PAR-276)ParadauxIO/hibernia-economy
Comments
No comments yet.
Activity
- ParadauxIO linked a commit — Commit 17c3184 — Fix Business enable: decouple Carbon soft-dep + break HelpCommands DI cycle (PAR-276)
- tesks created the issue