-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[incubator-kie-drools#5709] [new-parser] Some rules do not fire in Mu… #5794
[incubator-kie-drools#5709] [new-parser] Some rules do not fire in Mu… #5794
Conversation
Fixed Before PR
After PR
|
@@ -268,6 +268,7 @@ public RuleDescr visitRuledef(DRLParser.RuledefContext ctx) { | |||
ruleDescr.setConsequence(trimThen(getTokenTextPreservingWhitespace(ctx.rhs(), tokenStream))); // RHS is just a text | |||
} | |||
|
|||
populateStartEnd(ruleDescr, ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The root cause was that RuleDescr.getStartCharacter()
returned -1
(missed in DRLVisitorImpl
), so the kbase was not updated (the error was logged). So fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tkobayas , thanks for the PR!
IIUC the comment, it means that a piece of code does not populate correctly a given object (ruleDescr
), and your modification somehow "workaround" that.
I read the method, and TBH is somehow "brittle" by itself (I may give detailed explanation of this remark, if you want): would not be better to fix the root problem itself ? Eventually, I would be glad to help there
@yurloc @mariofusco @gitgabrio Please review, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tkobayas
but IIUC, the problem is elsewhere (please correct me if I'm wrong)
@@ -268,6 +268,7 @@ public RuleDescr visitRuledef(DRLParser.RuledefContext ctx) { | |||
ruleDescr.setConsequence(trimThen(getTokenTextPreservingWhitespace(ctx.rhs(), tokenStream))); // RHS is just a text | |||
} | |||
|
|||
populateStartEnd(ruleDescr, ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tkobayas , thanks for the PR!
IIUC the comment, it means that a piece of code does not populate correctly a given object (ruleDescr
), and your modification somehow "workaround" that.
I read the method, and TBH is somehow "brittle" by itself (I may give detailed explanation of this remark, if you want): would not be better to fix the root problem itself ? Eventually, I would be glad to help there
@mariofusco @baldimir @yesamer
IMO we have to to change the approach and the mindset, striving to improve the code whenever we have the chance: wdyt ? |
@gitgabrio Thank you for the suggestion.
Having said that,
and
Does it make sense? Thanks! |
@tkobayas
why they are not already populated at that specific point, and the proposed modification has to populate them ?
Yes, I understand that "from the parser point of view" this could be the right fix, but IIUC the problem is somewhere else (please correct me if I'm wrong, I'm simply inferring from your own comment) and we, as communtiy, have to manage all the codebase as a whole. |
Talking about the root cause "why we had this bug", I think of
In this regard, I filed #5798
My comment:
meant that the
Sure, we can talk on meet or zoom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkobayas
Many thanks for the chat and the explanation: it clarifies things a lot!
With that in place, I see this PR is good to merge.
Thanks again!
@gitgabrio Thanks! |
@mariofusco @tkobayas @baldimir @yesamer |
Overall fixing progress: There were 407 failed tests. |
…ltiKieBaseTest
Issue:
How to replicate CI configuration locally?
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.
How to retest this PR or trigger a specific build:
for pull request and downstream checks
for a full downstream build
run_fdb
for Jenkins PR check only
Build Now
button.