codeconsole opened a new pull request, #16385: URL: https://github.com/apache/grails-core/pull/16385
An application with a namespaced `@Scaffold` controller can render a different page after packaging than it does under `bootRun`. For example, an admin `EventController` generates an application-level `/event/show.gsp`, which shadows a calendar plugin's handwritten view at the same path. Development skips the application's precompiled view map, hiding the collision. Preserve the runtime resolver's view precedence when generating scaffold pages: - Leave namespaced controllers and their shared controller-name directories to runtime resolution. Detect static namespace fields/getters, including inherited declarations, without loading application classes. - Do not generate a page already registered by a dependency plugin. Read view indexes from the dependency runtime classpath, including `runtimeOnly` plugins, and track them as task inputs. - Keep precompiling unaffected scaffold views and retain application override precedence. Document the runtime fallback and the requirement for concrete views in native images. Validation covers namespace fields/getters and inheritance, shared controller names, plugin view indexes in directories/JARs, stale output removal, and TestKit staging/incremental rebuilds with a runtime-only plugin. The namespace regressions fail against the original implementation and pass with the fix. Validation commands: ```text cd grails-gradle ./gradlew :grails-gradle-plugins:test :grails-gradle-plugins:codeStyle :grails-gradle-plugins:validateDependencyVersions ``` All affected-module tests, style checks, and dependency validation passed. These are task and TestKit staging regressions; they do not start a production HTTP server. The repository-wide `./gradlew clean aggregateViolations :grails-test-report:check --continue` run produced clean Checkstyle, CodeNarc, PMD, and SpotBugs aggregate reports, but was stopped because its accumulated compiler/test workers caused excessive local memory pressure. Before cancellation, the broad suite reported a MongoDB Testcontainers replica-set initialization timeout in `InheritanceWithSingleEndedAssociationSpec`; it was not retried. The full repository test gate is therefore **not claimed to pass**. The affected Gradle-plugin module checks above completed successfully before that broad 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]
