[ 
https://issues.apache.org/jira/browse/LUCENE-9528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17197256#comment-17197256
 ] 

Erick Erickson commented on LUCENE-9528:
----------------------------------------

This'll be an interesting test of whether the Gradle tasks that process the jj 
file works, let me know if it doesn't...

I don't know how often the javacc task(s) are run. I do know that we've seen 
multiple instances of people hand-editing the _results_ of that task, it's very 
easy to overlook the comments at the top of the generated files that say DO NOT 
HAND EDIT. Particularly when you're trying to remove warnings, fix deprecations 
and the like.

Now I'm wondering if it makes sense to run this target as part of check. If 
people had hand-edited the output, it'd at least recreate the output with 
differences, then fail check because they weren't "git add"ed yet. It takes 
about 5 seconds to run that task.

It took me some time to make all of the hand-edits be done automatically, but 
the rule should be that if you hand-edit the results of that task, then 
something happens that gives you a clue you've done something wrong.

> Clean up obsolete and commented-out cruft from StandardSyntaxParser.jj
> ----------------------------------------------------------------------
>
>                 Key: LUCENE-9528
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9528
>             Project: Lucene - Core
>          Issue Type: Sub-task
>            Reporter: Dawid Weiss
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The indentation in that file is crazy. So are micro-optimizations which make 
> reading the syntax parser much more difficult than it actually is.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to