jdaugherty commented on PR #15755: URL: https://github.com/apache/grails-core/pull/15755#issuecomment-4905742078
Adding this comment from slack: My concern is we're going to add this new way, then add yet another way over 2 major versions. There are 2 components to this change: 1. the bean dsl needs deprecated. We discussed it in the weekly and we plan to add a method that just uses the BeanRegistry that spring added in 4 to directly wire - with the intent to remove the bean dsl. This doesn't have to be done as part of your PR. https://github.com/apache/grails-core/issues/14915 is the ticket for this part. 2. in 7.x I added the PluginDiscovery interface and shipped a default implementation. the purpose of this was to move the discovery process earlier in the spring lifecycle and integrate it so anything done in grails config is at the same point in the lifecycle that spring config would be. The class GrailsEnvironmentPostProcessor currently uses that to find the plugins and then add the configuration to the environment at the same point in the spring lifecycle that spring does (this means that the config is now usable in the spring annotations - ie the conditional annotations based on config). Prior to my change, spring would initialize, then as part of the application context creation, we would use the PluginManager to locate plugins, add their configuration, and then add their beans. I moved the find + config process to GrailsEnvironmentPostProcessor but never moved up the bean wiring. Your PR appears is the start at moving them up. My hope was we can rip out the legacy path and g o directly to the beanRegistry API in the best case. Worst case we would simplify the grails api entry points to assume they would initialize earlier (which fixes the problem your PR identified) -- 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]
