-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
#1228 - ArangoDb - grammar and tests #2963
Conversation
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.
Thank you for the new grammar but please factor common parts and fix formatting.
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
Co-authored-by: Ivan Kochurkin <[email protected]>
@kaby76 could you please take a look at PHP build? Does it make sense to restart the build? |
The PHP target for this grammar uses more than the available memory in PHP 8.1.12. If it doesn't work for that version of PHP, then it won't work for 8.0.x, which is being used in the CI build. In this case, php doesn't terminate. Fortunately, we have the trwdog app making sure this doesn't kill the build so much that intervention is required. But, the target doesn't work well with PHP. I suggest you just add "aql" to the skip list for PHP. Doesn't matter where, but in alphabetic order is preferred. Now, as far as what the parser fails on is "for.aql". This is a 2-line query. The grammar is ambiguous for expression, requiring a very, very large read ahead to determine. I think the grammar has some problems. But, this grammar should not fail like this for PHP. An issue should be created in antlr/antlr4 to determine why it's so bad. |
OK, the problem with this grammar is the choice between Change the expr rule or expr_list rule (maybe just remove?), and try seeing if that fixes the build. If not, just add aql to the skip list so it's not tested with PHP. |
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.
Yes, this looks good. Does it work with "mvn clean test"? If so, then this should work for PHP--and speed up all the other targets as well.
it did work locally |
Oh well--still doesn't work for PHP. After the build settles down, add aql to the skip-php.txt file to get past this problem for now. |
I added a "-d memory_limit=4G" option to the call to php on the command line, and although it runs longer, it still fails with a timeout. All tests parse fine except for.aql, and quickly. So, there is something quite wrong with the PHP target, the great joy of working with a type-less language. This needs to be raised in github.com/antlr/antlr4/issues. Working with 4.11.1 and PHP 8.1.12 |
The PR was merged, but the build was still broken. skip-php.txt should contain aql. I'll submit a PR to fix this, and an issue in antlr/antlr4 for the problem in parsing for.aql. |
The out of memory condition for aql/for.aql has been observed in another grammar. antlr/antlr-php-runtime#12 (comment) Tracking it down. (We could change the grammar, but then the bug will still be there.) |
No description provided.