The GitHub Actions job "CI" on grails-core.git/feat/gorm-query-safety-ast-check has failed. Run started by GitHub user borinquenkid (triggered by borinquenkid).
Head commit for run: cceff551fb99dc978d065391614f676bffd2af7b / Walter Duque de Estrada <[email protected]> Extend query safety check with branch-sensitivity fix and two new warnings Three follow-ups to the compile-time GORM query safety check, building on its existing local-variable/aliasing tracking: 1. Fix a real detection gap: reassignment tracking was last-write-wins across an if/else, so a variable flattened only in one branch could be silently forgotten if the other branch reassigned it safely, depending on which branch happened to be visited last (not which one actually runs). visitIfElse now walks each branch from the same starting state and merges pessimistically - unsafe in either branch stays unsafe. 2. Track String-typed fields assigned an interpolated GString (via a field initializer or this.field = ...) and flag a later this.field read in a query call. Unlike locals, a field can be reassigned from a constructor, another method, or a subclass this check never visits, so this is a compile-time warning, not a build failure. 3. Track query text built via '+' concatenation of a non-constant value with no GString involved (e.g. "select ... " + userInput) and warn - again a warning, not an error, since concatenation is common enough for benign purposes that a hard failure would be too blunt. Concatenating a live GString with more text is a different case: GString.plus returns a plain String, so that's an immediate flattening and is correctly promoted to the existing build-breaking error, not this warning. Verified via 10 new cases in GormQuerySafetyTransformerSpec, the existing suite still green, and a clean compile of grails-data-hibernate5-core and grails-data-hibernate7-core's test sources under the stricter checks - confirming no new false positives against real GORM implementation code. Co-Authored-By: Claude Sonnet 5 <[email protected]> Report URL: https://github.com/apache/grails-core/actions/runs/29618927729 With regards, GitHub Actions via GitBox
