Paradaux

PAR-278

0

[treasury-api-plugin] Fails to enable: concrete plugin not bound + HelpGenerator circular DI

Pending ReleaseUnassignedTreasury API

TreasuryAPI failed to enable with two DI faults (surfaced once Business enabled and the cascade cleared):

  1. Circular dependency. TreasuryAPICommand did @Inject HelpGenerator, and HelpGenerator takes a CommandManager, which injects the Set<CommandHandler> (incl. this command) → Guice CanNotProxyClass on the concrete CommandManager. Fix: inject Provider<CommandManager> and build HelpGenerator on demand (the Treasury/Business pattern).

  2. Concrete plugin not bound. Handlers inject the concrete TreasuryAPI type, but TreasuryAPIModule never bound it — it relied on an incorrect comment claiming HiberniaModule binds the concrete subtype (it only binds JavaPlugin/Plugin). Guice JIT-constructed a second TreasuryAPIIllegalArgumentException: Plugin already initialized!. Fix: bind(TreasuryAPI.class).toInstance(plugin) in the module, mirroring Treasury's TreasuryModule.

Verified: TreasuryAPI now enables.

Resources

Comments

No comments yet.

Activity

  • ParadauxIO linked a commit — Commit feb4d48 — Fix TreasuryAPI enable: bind concrete plugin + break HelpGenerator DI cycle (PAR-278)
  • tesks created the issue