codeconsole commented on PR #16385:
URL: https://github.com/apache/grails-core/pull/16385#issuecomment-5821937696

   @jdaugherty Thanks for the review and the merge. Your question about how 
broad the namespace rule needed to be led to a follow-up, #16398, which 
replaces this approach instead of hardening it further.
   
   Rather than putting generated pages in the controllers' view directories and 
predicting the resolver's precedence at build time, the build compiles one page 
per template and domain class under `grails-scaffolded/`. The page's name 
covers the template and model it was expanded from. The resolver still decides 
which template a request uses, exactly as at runtime, and only swaps the 
expansion for the compiled page when one matches. So nothing can shadow a 
declared view. Namespaced controllers, same-named controllers scaffolding 
different domains, and namespace-specific templates are now precompiled too. 
The plugin-index, namespace-detection and collision handling from this PR go 
away.
   
   The pages are expanded by the application's own scaffolding library and 
Groovy, in a JVM on its runtime classpath, so the build and the resolver share 
one implementation. The description covers native images, costs, and what was 
and wasn't run.


-- 
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]

Reply via email to