Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9411

Fail complation on warnings, 9x gradle-only



    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: main (9.0)
    • Component/s: general/build
    • Labels:
    • Lucene Fields:


      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.


        1. annotations-warnings.patch
          0.7 kB
          Dawid Weiss
        2. LUCENE-9411.patch
          3 kB
          Dawid Weiss
        3. LUCENE-9411.patch
          44 kB
          Erick Erickson
        4. LUCENE-9411.patch
          6 kB
          Erick Erickson
        5. LUCENE-9411.patch
          0.9 kB
          Erick Erickson
        6. LUCENE-9411-explicit-warnings.patch
          0.9 kB
          Erick Erickson

          Issue Links



              • Assignee:
                erickerickson Erick Erickson
                erickerickson Erick Erickson
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: