[ https://issues.apache.org/jira/browse/LUCENE-9411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17141570#comment-17141570 ]
Erick Erickson commented on LUCENE-9411: ---------------------------------------- The short form is that java generates compile-time warnings about not finding certain annotations, SuppressFBWarnings for instance. Solr itself includes none of these, and we certainly don’t redistribute the jars. But third-party jars like Zookeeper reference them and they create warnings because they’re not in the classpath when compiling Solr, see Dawid’s comments above. This makes compiling warning-free impossible. I can get compilations to be warning free by including things like spotbugs in the various dependencies, but that leads means check/precommit fail. I can modify our check/precommit code to _not_ check for these particular licenses, and since we don't redistribute them, nor do we even use them, that might be OK? But the goal of compiling warning free is not going to be accomplished unless we do something like that. Or remove Zookeeper and CaffeineCache which is not in the cards. This Jira is stymied until we resolve this... > Fail complation on warnings > --------------------------- > > Key: LUCENE-9411 > URL: https://issues.apache.org/jira/browse/LUCENE-9411 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build > Reporter: Erick Erickson > Assignee: Erick Erickson > Priority: Major > Labels: build > Attachments: LUCENE-9411.patch, LUCENE-9411.patch, LUCENE-9411.patch, > annotations-warnings.patch > > > Moving this over here from SOLR-11973 since it's part of the build system and > affects Lucene as well as Solr. You might want to see the discussion there. > We have a clean compile for both Solr and Lucene, no rawtypes, unchecked, > try, etc. warnings. There are some peculiar warnings (things like > SuppressFBWarnings, i.e. FindBugs) that I'm not sure about at all, but let's > assume those are not a problem. Now I'd like to start failing the compilation > if people write new code that generates warnings. > From what I can tell, just adding the flag is easy in both the Gradle and Ant > builds. I still have to prove out that adding -Werrors does what I expect, > i.e. succeeds now and fails when I introduce warnings. > But let's assume that works. Are there objections to this idea generally? I > hope to have some data by next Monday. > FWIW, the Lucene code base had far fewer issues than Solr, but > common-build.xml is in Lucene. -- 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