avaje / avaje-inject

Dependency injection via APT (source code generation) ala "Server-Side Dagger DI"
https://avaje.io/inject
Apache License 2.0
227 stars 21 forks source link

Restore autoProvides to exclude http controllers and generated http routes #587

Closed rbygrave closed 3 months ago

rbygrave commented 3 months ago

The change to autoProvides for Event support also meant that http controllers and http routes started to get included into autoProvides. The problem there is that http controllers are not expected to be public exported types and autoProvides with GenericType doesn't check is the type parameters are public.

SentryMan commented 3 months ago

The problem there is that http controllers are not expected to be public exported types

You have all kinds of applications, a week ago we had an issue in the discord. Routes provided in one module were not picked up in the other module that gathers all the routes and starts the server.

rbygrave commented 3 months ago

That isn't related to autoProvides though.

On Wed, 5 Jun 2024, 12:57 am Josiah Noel, @.***> wrote:

The problem there is that http controllers are not expected to be public exported types

You have all kinds of applications, a week ago we had an issue in the discord. Routes provided in one module were not picked up in the other module that gathers all the routes and starts the server.

— Reply to this email directly, view it on GitHub https://github.com/avaje/avaje-inject/pull/587#issuecomment-2147471344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABTATKZK66UFSJMLKG2CXLZFW2UJAVCNFSM6AAAAABIX5U632VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGQ3TCMZUGQ . You are receiving this because you modified the open/close state.Message ID: @.***>

SentryMan commented 3 months ago

That isn't related to autoProvides though.

With this change if we want to have an api module which created all the routes, and a svc module that consumes all route beans we need to add an @InjectModule(requires)