Skip to content

[drools-lsp-52] Update grammars to the latest#54

Merged
tkobayas merged 3 commits intokiegroup:mainfrom
tkobayas:drools-lsp-52-update-grammar-2
Apr 24, 2025
Merged

[drools-lsp-52] Update grammars to the latest#54
tkobayas merged 3 commits intokiegroup:mainfrom
tkobayas:drools-lsp-52-update-grammar-2

Conversation

@tkobayas
Copy link
Copy Markdown
Collaborator

@tkobayas tkobayas commented Apr 15, 2025


  • Taken the latest antler4 grammar files from drools repo
    • At the moment, we don't have a public drools version which contains the new parser, so I copied the grammar files instead of having a dependency to drools-drl-parser. When drools 10.1.0 is released, we will be able add the dependency. Probably we will revisit if we want to use the dependency or keep the grammar files because we may want to customize the grammar files to support requirements from LSP clients (DRL Editor).
  • Removed Visitor class and other support classes, because we need only grammar files for LSP at the moment.
  • Removed parser/visitor tests because they are done in the drools repo. Just keep a smoke test and a util test.
  • Updated JDK from 11 to 17
  • Updated Developer_Notes

- Taken grammar files from drools repo
- Removed parser/visitor tests
- Updated JDK from 11 to 17
@tkobayas
Copy link
Copy Markdown
Collaborator Author

Hmm, test on mac is unstable?

@tkobayas tkobayas marked this pull request as draft April 15, 2025 09:12
@tkobayas tkobayas force-pushed the drools-lsp-52-update-grammar-2 branch from ccb65f4 to a971e65 Compare April 16, 2025 01:16
@tkobayas tkobayas marked this pull request as ready for review April 16, 2025 01:17
@tkobayas
Copy link
Copy Markdown
Collaborator Author

@mariofusco @gitgabrio Please review, thanks!

@tkobayas tkobayas merged commit eb824b7 into kiegroup:main Apr 24, 2025
3 checks passed
DRL_SALIENCE : 'salience';
DRL_ENABLED : 'enabled';
DRL_NO_LOOP : 'no-loop';
DRL_AUTO_FOCUS : 'auto-focus';
DRL_LOCK_ON_ACTIVE : 'lock-on-active';
DRL_REFRACT : 'refract';
DRL_DIRECT : 'direct';
DRL_AGENDA_GROUP : 'agenda-group';
Copy link
Copy Markdown

@daniel-clark-mint daniel-clark-mint Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkobayas I can't find the any documentation for dropping agenda-goup - I fell like I saw some something way back when 10.0.0 was released but can't find it now. Is agenda-group deprecated? We have it in some very old rules which still seem to work on drools 10.0.1, but the new parser doesn't like it. Should we be migrating this?

Copy link
Copy Markdown
Collaborator Author

@tkobayas tkobayas Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniel-clark-mint Yes, the new language level DRL10 drops agenda-goup, because ruleflow-goup completely works as the same as agenda-goup. So the migration is just to replace agenda-goup with ruleflow-goup in your DRL.

Note that in Drools runtime, DRL6 is still the default, so your DRL will work fine with 10.2.0. But in the future, we will make DRL10 default, and finally drop DRL6.

It's my bad that I missed to mention about agenda-goup in the document and the release notes. I will work on the doc fix.
https://kie.apache.org/docs/10.1.x/drools/drools/release-notes/index.html#_10_1_0_release_notes
https://kie.apache.org/docs/10.1.x/drools/drools/language-reference/index.html#language-level_drl-rules

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed GH issue for doc : apache/incubator-kie-drools#6635

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you for the update @tkobayas ! That cleared up the syntax errors from the DRL10 LSP service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants