Paradaux

PAR-276

0

[business] Plugin fails to enable: Carbon soft-dep not actually soft + HelpCommands circular DI

Pending ReleaseUnassignedBusiness

Business failed to enable at startup with two distinct DI faults:

  1. CarbonChat soft-dependency wasn't soft. FirmChatService declared CarbonChat/FirmChatChannel-typed fields and a ChatChannel method param. Guice scans a class's declared members at injector-build time, so that reflection threw NoClassDefFoundError: net/draycia/carbon/api/channels/ChatChannel when CarbonChat wasn't installed — failing the whole injector before initialise() could soft-disable the feature. Fix: type those members as Object (cast inside the guarded method bodies, which only run when Carbon is present), so the class is reflectable without Carbon on the classpath.

  2. Circular dependency. HelpCommands injected CommandManager directly; CommandManager injects the Set<CommandHandler> (which includes HelpCommands), so Guice tried to proxy the concrete CommandManager and failed (CanNotProxyClass). Fix: inject Provider<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

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