You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2024/06/11 05:43:30 UTC
[PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
tkobayas opened a new pull request, #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989
**Issue**:
* https://github.com/apache/incubator-kie-drools/issues/5988
Merging `dev-new-parser` branch to `main` branch.
- Merging has to be done **after** Drools 10.0 release.
- Until the Drools 10.0 release, mark the PR [DO-NOT-MERGE] and make it **draft**.
- This PR makes the new parser **not** default parser. So it shouldn't affect the default behavior.
- Make sure to use **"Rebase and merge"** (not "Squash and merge") in the Github UI to keep commit history.
- After Drools 10 release, discuss the future plan in dev@kie.apache ML.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#discussion_r1634248122
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
// TODO: REMOVE THIS GENERIC MESSAGE ASAP
private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n";
+ private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}";
private final List<DroolsError> results = new ArrayList<>();
private List<DroolsSentence> editorSentences = null;
private Location location = new Location( Location.LOCATION_UNKNOWN );
private DRLLexer lexer = null;
private Resource resource = null;
+ public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled";
+
+ // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable
+ public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false
Review Comment:
The new parser is disabled by default. So it shouldn't affect the default behavior. Also unit tests (except `drools-drl-parser-tests`) run with the old parser.
I'll raise another PR for CI check.
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
// TODO: REMOVE THIS GENERIC MESSAGE ASAP
private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n";
+ private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}";
private final List<DroolsError> results = new ArrayList<>();
private List<DroolsSentence> editorSentences = null;
private Location location = new Location( Location.LOCATION_UNKNOWN );
private DRLLexer lexer = null;
private Resource resource = null;
+ public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled";
+
+ // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable
+ public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false
Review Comment:
The new parser is disabled by default. So it shouldn't affect the default behavior. Also unit tests (except `drools-drl-parser-tests`) run with the old parser.
I'll raise another PR for new parser CI check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#discussion_r1634248122
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
// TODO: REMOVE THIS GENERIC MESSAGE ASAP
private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n";
+ private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}";
private final List<DroolsError> results = new ArrayList<>();
private List<DroolsSentence> editorSentences = null;
private Location location = new Location( Location.LOCATION_UNKNOWN );
private DRLLexer lexer = null;
private Resource resource = null;
+ public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled";
+
+ // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable
+ public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false
Review Comment:
The new parser is disabled by default. So it shouldn't affect the default behavior. Also unit tests (except `drools-drl-parser-tests`) run with the old parser.
I'll raise another draft PR for new parser CI check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#discussion_r1634248122
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
// TODO: REMOVE THIS GENERIC MESSAGE ASAP
private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n";
+ private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}";
private final List<DroolsError> results = new ArrayList<>();
private List<DroolsSentence> editorSentences = null;
private Location location = new Location( Location.LOCATION_UNKNOWN );
private DRLLexer lexer = null;
private Resource resource = null;
+ public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled";
+
+ // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable
+ public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false
Review Comment:
The new parser is disabled by default. So it shouldn't affect the default behavior. Also unit tests (except `drools-drl-parser-tests`) run with the old parser.
https://github.com/apache/incubator-kie-drools/pull/5990 is for the new parser CI check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#issuecomment-2406342797
Rebased to resolve conflict with https://github.com/apache/incubator-kie-drools/pull/6115
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas merged PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#discussion_r1634248122
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
// TODO: REMOVE THIS GENERIC MESSAGE ASAP
private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n";
+ private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}";
private final List<DroolsError> results = new ArrayList<>();
private List<DroolsSentence> editorSentences = null;
private Location location = new Location( Location.LOCATION_UNKNOWN );
private DRLLexer lexer = null;
private Resource resource = null;
+ public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled";
+
+ // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable
+ public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false
Review Comment:
The new parser is disabled by default. So it shouldn't affect the default behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#issuecomment-2159846207
[DRAFT] I'll ask for review **after** Drools 10.0 is released.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DO-NOT-MERGE] [new-parser] Merge dev-new-parser to main [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5989:
URL: https://github.com/apache/incubator-kie-drools/pull/5989#discussion_r1634248122
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
// TODO: REMOVE THIS GENERIC MESSAGE ASAP
private static final String GENERIC_ERROR_MESSAGE = "Unexpected exception raised while parsing. This is a bug. Please contact the Development team :\n";
+ private static final String DEBUG_PARSER_LOG = "parse : ANTLR4_PARSER_ENABLED = {}";
private final List<DroolsError> results = new ArrayList<>();
private List<DroolsSentence> editorSentences = null;
private Location location = new Location( Location.LOCATION_UNKNOWN );
private DRLLexer lexer = null;
private Resource resource = null;
+ public static final String ANTLR4_PARSER_ENABLED_PROPERTY = "drools.drl.antlr4.parser.enabled";
+
+ // temporarily removed 'final' for testing purposes. This should be final when the feature gets stable
+ public static boolean ANTLR4_PARSER_ENABLED = Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, "false")); // default is false
Review Comment:
The new parser is disabled by default. So it shouldn't affect the default behavior. Also unit tests (except `drools-drl-parser-tests`) run with the old parser.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org