The GitHub Actions job "Coverage" on 
grails-core.git/criteria-typecheck-chained-8 has failed.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
c1410a5ffd23e9bf945280785681ab219eb65a03 / Scott Murphy Heiberg 
<[email protected]>
Register CriteriaTypeCheckingExtension and cover createCriteria().<terminal>{} 
closures

CriteriaTypeCheckingExtension existed but was never added to the
@GrailsCompileStatic extension list, and isCriteriaCall only recognized the
Domain.withCriteria {} / Domain.createCriteria() forms where the closure is
the direct argument. The chained Domain.createCriteria().<terminal> { } form
(closure as the argument to a terminal called on the builder) was not
matched, so its scope was never opened.

Most chained terminals (list/listDistinct/get/scroll) still type-checked
because BuildableCriteria declares them with a Closure parameter and
@DelegatesTo resolves the closure body. count(Closure) is not declared on
BuildableCriteria, so Domain.createCriteria().count {} failed static
compilation with 'Cannot find matching method BuildableCriteria#count(Closure)'.

Extend isCriteriaCall to also open a criteria scope for a terminal
(list/listDistinct/get/count/scroll) chained directly on createCriteria(),
and register the extension in @GrailsCompileStatic so criteria-builder
closures type-check under static compilation. Adds a test covering all six
chained terminals; count is the case that fails without this change.

git log --oneline -1

Report URL: https://github.com/apache/grails-core/actions/runs/27033483814

With regards,
GitHub Actions via GitBox

Reply via email to