You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "drccrd (via GitHub)" <gi...@apache.org> on 2026/06/29 15:43:12 UTC

[I] Executable model: a constraint the pattern auto-naming pre-pass can't parse aborts the entire KieBase build (Minor) [incubator-kie-drools]

drccrd opened a new issue, #6784:
URL: https://github.com/apache/incubator-kie-drools/issues/6784

   **Summary:** When a pattern has no identifier, the exec model auto-generates one; to do so, `ClassPatternDSL.findFirstInnerBinding` parses **every** constraint with `DrlxParseUtil.parseExpression` — a stricter parser than the `ConstraintParser.drlxParse` used for actual constraint compilation. If that strict parse throws, the `ParseProblemException` propagates and aborts the whole KieBase build from the naming pre-pass, masking the real compilation and yielding a confusing error.
   
   **Reproducer** (`Child extends Person`; constraint uses the subtype-match idiom `class == X.class`):
   ```drl
   import org.test.Person;
   import org.test.Child;
   rule R when
     Person( class == Child.class )
   then end
   ```
   - **Actual:** `ParseProblemException: Encountered unexpected token … at line 1, column 1`, thrown from `findFirstInnerBinding` → aborts the build.
   
   **Root cause:** `findFirstInnerBinding` does not guard the `parseExpression` call. A constraint the strict parser can't parse cannot contribute an inner binding for naming anyway, so it should not abort the build.
   
   **Suggested fix:** catch the parse failure, log it (rule + pattern type + offending expression), and skip it — letting the real compilation path (`findAllConstraint` → `drlxParse`) either compile the constraint or report a proper error.


-- 
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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Executable model: constraint auto-naming parse failure isn't identifiable in the log (Minor) [incubator-kie-drools]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas closed issue #6784: Executable model: constraint auto-naming parse failure isn't identifiable in the log (Minor)
URL: https://github.com/apache/incubator-kie-drools/issues/6784


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org