-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Consider adopting a parsing library for query lines to replace hard-to-maintain regular expressions #2079
Comments
We do have a parsing library, |
😄
Yes, I'm very conscious of that too.
That's great to hear, @esm7... If you happened to have any notes about the ones you investigated, would you mind dropping them in here when you have time... |
Will try to dig up the relevant notes. I found the note where I found and decided upon |
Even if it's not used for parsing, defining the grammar for tasks queries would be good documentation. I suspect that creating a clean grammar will require changing the behavior of some edge cases. What level of breaking changes are acceptable for the project? |
For accidental behaviour that was not documented, then changes in behaviour where the user is informed, those would be OK. (For example, a new error message that says “this used to do X, now that doesn’t work anymore - change your query to Y instead”) For documented behaviour, I would want to discuss it on a case-by-case basis, but the default answer would be “none”. |
When specific changes are discovered, it will definitely be worth discussing them. |
Description
Problem
We have a number of bug reports around problems interpreting complex query lines. For example:
Idea
I have been thinking for some time that as we add more features, our regular expressions are getting more complex.
And it would be worth investigating whether re-using an existing parsing solution would be more sustainable, long-term.
Options
I asked in OMG Discord - #plugin-dev on 2023-05-29, and the replies were:
Required Steps
Establish our requirements for parsers
Pick a library
Start migrating code, incrementally.
How to Test
Confirm that the existing Jest tests and smoke tests all work.
The text was updated successfully, but these errors were encountered: