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] PackageDescr.resource not set #5933

Closed
yurloc opened this issue May 13, 2024 · 4 comments
Closed

[new-parser] PackageDescr.resource not set #5933

yurloc opened this issue May 13, 2024 · 4 comments
Assignees

Comments

@yurloc
Copy link
Contributor

yurloc commented May 13, 2024

Parent issue

Failing tests

  • org.drools.mvel.compiler.compiler.DescrResourceSetTest#drlFilesTest

Notes

DRLVisitorImpl should simply set the Resource that was parsed to each Descr in the resulting AST.

Rule code snippet

N/A.

Error output

### parse : ANTLR4_PARSER_ENABLED = true

java.lang.AssertionError: [PackageDescr.resource is null!] 
Expecting actual not to be null

	at org.drools.mvel.compiler.compiler.PackageDescrResourceVisitor.checkResource(PackageDescrResourceVisitor.java:76)
	at org.drools.mvel.compiler.compiler.PackageDescrResourceVisitor.visit(PackageDescrResourceVisitor.java:315)
	at org.drools.mvel.compiler.compiler.DescrResourceSetTest.drlFilesTest(DescrResourceSetTest.java:63)
@yurloc
Copy link
Contributor Author

yurloc commented May 13, 2024

good-first-issue

@tkobayas
Copy link
Contributor

/take This seems to be a little more complex than the first look.

@tkobayas
Copy link
Contributor

DescrResourceSetTest goes through all drl files in test-compiler-integration. If there is a parser error, the resource assertion is skipped. So it's better to hold on this fix until some other test failures will be fixed.

@tkobayas
Copy link
Contributor

tkobayas commented Jun 7, 2024

Fixed by #5984

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

No branches or pull requests

2 participants