[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on LUCENE-9864:
-

Commit 3ed87c867a6c3edd5d8b5aa1a1dee3264af401aa in lucene's branch 
refs/heads/main from zacharymorn
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=3ed87c8 ]

LUCENE-9864: Enforce @Override annotation everywhere (#40)

Requiring the annotation is helpful because if an abstract method is removed, 
the concrete methods will then show up as compile errors: preventing dead code 
from being accidentally left behind.

Co-authored-by: Robert Muir 

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Dawid Weiss (Jira)


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

Dawid Weiss commented on LUCENE-9864:
-

I'll take a look at making this jflex task saner as part of checksums of 
generated files. It is insane that automation minimizer there takes so much 
time... [~zacharymorn]? Maybe a diversion into the automata world? :)

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Robert Muir (Jira)


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

Robert Muir commented on LUCENE-9864:
-

Thank you [~dweiss]. Congratulations, you made it into .bashrc:

{noformat}
# regenerate lucene without mining bitcoins, tripping OOMKiller, burning out 
CPU fan motor, etc
alias lucene_regen='./gradlew regenerate -x jflexUAX29URLEmailTokenizerImpl'
{noformat}

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Dawid Weiss (Jira)


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

Dawid Weiss commented on LUCENE-9864:
-

{code} gradlew regenerate -x jflexUAX29URLEmailTokenizerImpl {code}
Leave that one for last, when everything else is working.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Robert Muir (Jira)


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

Robert Muir commented on LUCENE-9864:
-

I'm working on the queryparser pieces. It is just slow because it regenerates 
that large DFA every time I iterate :)

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Robert Muir (Jira)


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

Robert Muir commented on LUCENE-9864:
-

Sorry, I missed seeing the modified queryparser sources (generated javacc 
code). So we have to fix those in the PR, too. But at least we are closer.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Robert Muir (Jira)


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

Robert Muir commented on LUCENE-9864:
-

I only saw issues with snowball generated code: I updated the snowball 
regeneration in [~zacharymorn]'s PR. So I think we are ok?

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Dawid Weiss (Jira)


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

Dawid Weiss commented on LUCENE-9864:
-

It's simpler because you don't need to know what gets generated and where. But 
checksum idea is entirely doable too, I'll file an issue.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Dawid Weiss (Jira)


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

Dawid Weiss commented on LUCENE-9864:
-

Yes, we could do this. Alternatively, we a much simpler way to do it would be 
to run regenerate on nightly runs and check that git status is clean... This 
wouldn't trigger the problem immediately (some regenerate tasks are slow) but 
would eventually fail the build.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Uwe Schindler (Jira)


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

Uwe Schindler commented on LUCENE-9864:
---

Especially the missing overrides at beginning of file in the tartarus-snowball 
packages need to be patched in the regneration task of gradle.

IMHO, we should really make sure that we add some "autogen marker comment 
header" on all autogenerated files and maybe add some check in our source code 
checks, that files are not accidentally updated by autoreformatting/fixup by 
IDE code. One idea would be: All regeneration taks add some header on top of 
the file with a checksum. In precommit we check that the hash in the header 
still applies to the remaining file contents. We can maybe also add a sha1/md5 
file next to each regenerated file that is solely updated on regeneration.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Dawid Weiss (Jira)


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

Dawid Weiss commented on LUCENE-9864:
-

Try gradlew regenerate -x jflexUAX29URLEmailTokenizerImpl - this last task is 
super-large.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Dawid Weiss (Jira)


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

Dawid Weiss commented on LUCENE-9864:
-

The patch changes files in generated code. If you run "gradlew regenerate" I'm 
sure there'll be local changes -- the generators (for snowball, maybe for other 
files as well) should be modified to incorporate this change too.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-25 Thread Zach Chen (Jira)


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

Zach Chen commented on LUCENE-9864:
---

Hi [~rcmuir] [~uschindler], I've opened a PR to enforce @Override annotation 
and added the missing ones. Please let me know if it looks good to you.

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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



[jira] [Commented] (LUCENE-9864) Enforce @Override annotation with ecj static analysis configuration

2021-03-24 Thread Uwe Schindler (Jira)


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

Uwe Schindler commented on LUCENE-9864:
---

+1

> Enforce @Override annotation with ecj static analysis configuration
> ---
>
> Key: LUCENE-9864
> URL: https://issues.apache.org/jira/browse/LUCENE-9864
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Reporter: Zach Chen
>Priority: Minor
>  Labels: build
> Fix For: main (9.0)
>
>
> This is a spin-off issue from 
> https://issues.apache.org/jira/browse/LUCENE-9856, where ecj configuration 
> was updated to catch dead code and lots of dead code was removed. In this 
> issue, we would like to continue the clean up by enforcing *@Override* usage 
> with *org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error* 
> configuration, and fix problems that arise. 



--
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