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

   The failures are not snapshot resolution. 
`:grails-test-examples-scaffolding:compileGroovyPages` fails:
   
   ```
   gsp_grails_test_examples_scaffolding_usershow_gsp.groovy: 28: [Static type 
checking] - The variable [entityName] is undeclared.
   gsp_grails_test_examples_scaffolding_usershow_gsp.groovy: 70: [Static type 
checking] - The variable [controllerName] is undeclared.
   ```
   
   Expanding the scaffolding templates at build time so the GSP compiler can 
precompile them rests on those templates being compilable that way, and they 
are not: `entityName` is declared by `g:set` as the page renders, and 
`controllerName` comes from the request. Neither is visible to a static 
compile. That failed the GSP compilation for every project that scaffolds, and 
took the 652 tests with it.
   
   Removed in e93d383, together with the `@{ model=... }` directives that had 
been added to the shipped scaffolding templates to work around it — those 
changed what every application renders at run time in order to serve a 
build-time feature.
   
   Making a scaffolded view precompilable means making the templates say what 
they read, which changes what scaffolding renders for everyone and is its own 
piece of work. Nothing here needs it: precompiled scaffolded views matter to a 
native image, which this PR does not yet deliver.


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