Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new-parser] Support optional type keyword for backward compatibility #5911

Closed
yurloc opened this issue May 8, 2024 · 1 comment
Closed
Assignees

Comments

@yurloc
Copy link
Contributor

yurloc commented May 8, 2024

Parent issue

Failing tests

  • org.drools.mvel.integrationtests.DynamicRulesTest#testDynamicRulesWithTypeDeclarations
  • org.drools.mvel.integrationtests.KieCompilationCacheTest#testCompilationCache

Rule code snippet

declare type Foo
  id : int
end

Error output

14:50:16.152 [Time-limited test] WARN  o.d.c.k.b.impl.AbstractKieProject.buildKnowledgePackages:256 - No files found for KieBase KieBaseModelName
### parse : ANTLR4_PARSER_ENABLED = true
line 3:2 extraneous input 'id' expecting ':'
14:50:16.158 [Time-limited test] ERROR o.d.c.k.b.impl.AbstractKieProject.buildKnowledgePackages:280 - Unable to build KieBaseModel:KieBaseModelName
[3,2]: extraneous input 'id' expecting ':'
[0,0]: Parser returned a null Package

14:50:16.158 [Time-limited test] ERROR o.d.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem:165 - KieBuilder errors: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=3, column=0
   text=extraneous input 'id' expecting ':'], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=0, column=0
   text=Parser returned a null Package]]

java.lang.AssertionError: [[Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=3, column=0
   text=extraneous input 'id' expecting ':'], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=0, column=0
   text=Parser returned a null Package]]] 
Expecting empty but was: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=3, column=0
   text=extraneous input 'id' expecting ':'],
    Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=0, column=0
   text=Parser returned a null Package]]

	at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:169)
	at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:134)
	at org.drools.testcoverage.common.util.KieUtil.buildAndInstallKieModuleIntoRepo(KieUtil.java:78)
	at org.drools.testcoverage.common.util.KieUtil.buildAndInstallKieModuleIntoRepo(KieUtil.java:72)
	at org.drools.testcoverage.common.util.KieUtil.getKieModuleFromResources(KieUtil.java:249)
	at org.drools.testcoverage.common.util.KieUtil.getKieModuleFromResources(KieUtil.java:238)
	at org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromKieModuleFromResources(KieBaseUtil.java:102)
	at org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromKieModuleFromDrl(KieBaseUtil.java:115)
	at org.drools.mvel.integrationtests.DynamicRulesTest.testDynamicRulesWithTypeDeclarations(DynamicRulesTest.java:1118)
@tkobayas
Copy link
Contributor

tkobayas commented Jun 4, 2024

Fixed by #5977

@tkobayas tkobayas closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🎯 Done
Development

No branches or pull requests

2 participants