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

gradlew checkMissingDocsDefault fails on JDK 15 or later

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 9.0
    • None
    • general/javadocs
    • New

    Description

      All Policeman Jenkins Jobs fail on the EA build with Java 15. Reason is that the task checkMissingDocsDefault fails due to "missing documentation":

      1: Task failed with an exception.
      -----------
      * Where:
      Script '/home/jenkins/workspace/Lucene-Solr-master-Linux/gradle/validation/missing-docs-check.gradle' line: 105
      
      * What went wrong:
      Execution failed for task ':lucene:classification:checkMissingDocsDefault'.
      > Javadoc verification failed:
        Traceback (most recent call last):
          File "/home/jenkins/workspace/Lucene-Solr-master-Linux/dev-tools/scripts/checkJavaDocs.py", line 388, in <module>
            if checkPackageSummaries(sys.argv[1], level):
          File "/home/jenkins/workspace/Lucene-Solr-master-Linux/dev-tools/scripts/checkJavaDocs.py", line 368, in checkPackageSummaries
            if checkClassSummaries(fullPath):
          File "/home/jenkins/workspace/Lucene-Solr-master-Linux/dev-tools/scripts/checkJavaDocs.py", line 227, in checkClassSummaries
            raise RuntimeError('failed to locate javadoc item in %s, line %d? last line: %s' % (fullPath, lineCount, line.rstrip()))
        RuntimeError: failed to locate javadoc item in /home/jenkins/workspace/Lucene-Solr-master-Linux/lucene/classification/build/docs/javadoc/org/apache/lucene/classification/ClassificationResult.html, line 135? last line: </tr>
      
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      ==============================================================================
      

      Interestingly, it doe snot fail on all subprojects. It looks like JDK15 changed the HTML output and so the checks are failing.

      With the Ant build this was not a problem, as we disabled this task (and all other documentation-lint tasks), if running with an unsupported JDK version. It's very har to rely on HTML output, as this can change on every JDK version.

      We have 2 options:

      • Maybe fix some regular expression in the python script (sorry I have no idea on python and what's the problem)
      • Disable the python-linter tasks as we did in Ant, when the java version (of RUNTIME_JAVA_HOME) is outside our expectations!

      My personal opinion is to handle this in same way like Ant: Disable the documentation-linter for any RUNTIME_JAVA_HOME version later than our supported one. Or maybe disable it always when we use an alternative JDK? That's easiest to check when bulding task dependencies in Gradle, IMHO, whenever an alternate Java Home is given. If the alternative JVM is the same as Gradle's it would be kept enabled anyways, so the ideal place for this would be here:
      https://github.com/apache/lucene-solr/blob/master/gradle/testing/alternative-jdk-support.gradle#L52-L71

      Just add another tasks.withType(). and set task.enabled = false.

      dawid.weiss, tomoko: Any ideas or recommendation?

      Attachments

        1. LUCENE-9490.patch
          4 kB
          Tomoko Uchida
        2. screen-[1].png
          258 kB
          Dawid Weiss

        Activity

          People

            dweiss Dawid Weiss
            uschindler Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: