apache / incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
http://www.drools.org
5.85k stars 2.49k forks source link

[incubator-kie-drools-5920] [new-parser] Strict annotation parsing #5976

Closed tkobayas closed 4 months ago

tkobayas commented 4 months ago

Issue:

tkobayas commented 4 months ago

LanguageLevelOption.DRL6_STRICT has 2 points: 1) Parser phase: Annotation should be placed at the beginning of the statement. e.g.

@Xyz rule yyy
when
  ...

2) Compiler phase: Annotation should be resolved as Java annotation (= custom annotation java class has to actually exist).

LanguageLevelOption.DRL6_STRICT is not written in document and I haven't seen users using it. Also implementing it would cause complexity which doesn't likely pay off (Old parser maintains 2 parser classes DRL6Parser and DRL6StrictParser). So I think we can skip the test at the moment, and we will discuss a deprecation plan in dev@kie.apache.org later. Of course, if there is a strong need, we will be able to implement it. WDYT? @mariofusco @yurloc @gitgabrio @baldimir