Uwe Schindler created LUCENE-9490:
-------------------------------------

             Summary: gradlew checkMissingDocsDefault fails on JDK 15 or later
                 Key: LUCENE-9490
                 URL: https://issues.apache.org/jira/browse/LUCENE-9490
             Project: Lucene - Core
          Issue Type: Bug
          Components: general/javadocs
    Affects Versions: master (9.0)
            Reporter: Uwe Schindler


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

{noformat}
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.
==============================================================================
{noformat}

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. If alternate Java Home 
is given and the JVM.

Maybe do this 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?



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to