apache / incubator-kie-drools

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

[new-parser] Disable DRLIncompleteCodeTest #5924

Closed tkobayas closed 6 months ago

tkobayas commented 6 months ago

Parent issue

Failing tests

Rule code snippet

        DrlParser parser = new DrlParser(LanguageLevelOption.DRL5);
        PackageDescr descr = parser.parse(true, input);

parse(true, means that it's in Editor mode. When Editor mode:

Here "Editor" means Eclipse plugin and web workbench, which had already retired in Drools 8.

The next DRL Editor aims at LSP based ones. So I think there is no reason to implement the Editor mode and pass DRLIncompleteCodeTest. Implementing the Editor mode may not be a large effort, but it would pollute DRLVisitorImpl code.

Error output

DRLIncompleteCodeTest#testIncompleteCode3

java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because the return value of "org.drools.drl.parser.DrlParser.getEditorSentences()" is null

    at org.drools.mvel.compiler.lang.DRLIncompleteCodeTest.testIncompleteCode3(DRLIncompleteCodeTest.java:88)
tkobayas commented 6 months ago

/take

yurloc commented 6 months ago

See also

which use the parser in editor mode.

tkobayas commented 6 months ago

Done by https://github.com/apache/incubator-kie-drools/pull/5941