jdaugherty commented on PR #15518: URL: https://github.com/apache/grails-core/pull/15518#issuecomment-4104862362
> * Does bean registration have to correlate with plugin load ordering, or can we let the features available for the Spring context handle that for us? `@Conditional*`, `@Lazy`, `ObjectProvider<T>` etc. @matrei The existing architecture supports loading the beans in the order defined by the plugin load order. So yes. > * What would be the use case for loading before `dataBinding`? Does that matter? The issue is defining a plugin implies that one can load before/after it. This isn't supported currently. > * Is there a use case nowadays for having one plugin evict another? I see this as problematic in conjunction with `@Configuration` as beans will already be registered when eviction starts. Doesn't it make more sense to just remove the plugin dependency in the application. Maybe we can stop startup with a message if "evicted" (incompatible) plugins are on the classpath? Isn't this debating the architecture of the plugins (I agree they need reworked). I'm just going for a consistent behavior. > * I don't see any plugin "traits" in `grails-web-common`. (I may be missing something) That library defines a `grails.factories` file which is often shipped a long side plugins since it's used to populate GrailsArtifacts. > Plugin "traits" as I see them (one or more of): > > * Grails artefacts (controllers, url-mappings, services, taglibs, cli > commands etc.) > > * Beans registered in the application context > > * Application resources > > * Lifecycle event handlers > > * Trait injectors* > > * Groovy Extension Modules* > > * Metadata > > * Title > * Description > * Author > * Grails version compatibility range > * License > * Documentation url > * Scm details > > > * This is not a plugin trait in and of itself, but can be part of a plugin Unfortunately, we moved bean wiring to `@Configuration` and as a result I think we really need to have a discussion about formalizing the plugin architecture in 8. I agree with you on the plugin traits. I think we need to define a hard contract / interface for Grails Plugins and document these behaviors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
