uschindler commented on a change in pull request #533:
URL: https://github.com/apache/lucene/pull/533#discussion_r771271952
##########
File path: gradle/validation/ecj-lint.gradle
##########
@@ -72,22 +83,41 @@ allprojects {
args += [ "-enableJavadoc" ]
args += [ "-properties",
file("${resources}/ecj.javadocs.prefs").absolutePath ]
- doFirst {
- tmpDst.mkdirs()
+ // We depend on modular paths.
+ def modularPaths = sourceSet.modularPaths
+ dependsOn modularPaths.compileModulePathConfiguration
+
+ task.argumentProviders.add((CommandLineArgumentProvider) {
Review comment:
Here somewhere seems to be a problem with quotes around arguments:
```
> Task :lucene:benchmark:ecjLintMain FAILED
Unrecognized option : C:\Users\Uwe
> Task :lucene:classification:ecjLintMain FAILED
Unrecognized option : C:\Users\Uwe
> Task :lucene:backward-codecs:ecjLintMain
Unrecognized option : C:\Users\Uwe
> Task :lucene:backward-codecs:ecjLintMain FAILED
FAILURE: Build completed with 3 failures.
```
The ECJ call fails with whitespace in path name.
Javadoc works, so something here must be different!
##########
File path: gradle/documentation/render-javadoc.gradle
##########
@@ -57,20 +57,24 @@ allprojects {
outputDir = project.javadoc.destinationDir
}
- task renderSiteJavadoc(type: RenderJavadocTask) {
- description "Generates Javadoc API documentation for the site (relative
links)."
- group "documentation"
-
- taskResources = resources
- dependsOn sourceSets.main.compileClasspath
- classpath = sourceSets.main.compileClasspath;
- srcDirSet = sourceSets.main.java;
-
- relativeProjectLinks = true
-
- // Place the documentation under Lucene or Solr's documentation
directory.
- // docroot is defined in 'documentation.gradle'
- outputDir =
project.docroot.toPath().resolve(project.relativeDocPath).toFile()
+ if (project.path == ':lucene:luke' || project.path.endsWith(".tests")) {
Review comment:
I checked, this all works fine. I also checked the javadocs itsself if
between the javadocs cross-links work. Those are also generated based on
dependencies, I just wanted to make sure. So all is fine to me.
##########
File path: gradle/documentation/render-javadoc.gradle
##########
@@ -57,20 +57,24 @@ allprojects {
outputDir = project.javadoc.destinationDir
}
- task renderSiteJavadoc(type: RenderJavadocTask) {
- description "Generates Javadoc API documentation for the site (relative
links)."
- group "documentation"
-
- taskResources = resources
- dependsOn sourceSets.main.compileClasspath
- classpath = sourceSets.main.compileClasspath;
- srcDirSet = sourceSets.main.java;
-
- relativeProjectLinks = true
-
- // Place the documentation under Lucene or Solr's documentation
directory.
- // docroot is defined in 'documentation.gradle'
- outputDir =
project.docroot.toPath().resolve(project.relativeDocPath).toFile()
+ if (project.path == ':lucene:luke' || project.path.endsWith(".tests")) {
Review comment:
We should add a TODO that we need to enable Javadoc Module support.
Currently the Javadocs do not mention that a class belongs to a module.
##########
File path: gradle/documentation/render-javadoc.gradle
##########
@@ -57,20 +57,24 @@ allprojects {
outputDir = project.javadoc.destinationDir
}
- task renderSiteJavadoc(type: RenderJavadocTask) {
- description "Generates Javadoc API documentation for the site (relative
links)."
- group "documentation"
-
- taskResources = resources
- dependsOn sourceSets.main.compileClasspath
- classpath = sourceSets.main.compileClasspath;
- srcDirSet = sourceSets.main.java;
-
- relativeProjectLinks = true
-
- // Place the documentation under Lucene or Solr's documentation
directory.
- // docroot is defined in 'documentation.gradle'
- outputDir =
project.docroot.toPath().resolve(project.relativeDocPath).toFile()
+ if (project.path == ':lucene:luke' || project.path.endsWith(".tests")) {
Review comment:
I think this was moved from somewhere down the diff. The problem with
not disabling the Javadoc task (like done before) may be the building of the
dependencies (luckily nothing depends on luke) and also the documentation
homepage:
https://github.com/apache/lucene/blob/ae92e96481aa85c73be88ba2e1479d50a02b6671/gradle/documentation/markdown.gradle#L153
But I think that code should work fine. I will checkout everything and look
into that, I just wanted to write it down here.
##########
File path: gradle/validation/ecj-lint.gradle
##########
@@ -72,22 +83,41 @@ allprojects {
args += [ "-enableJavadoc" ]
args += [ "-properties",
file("${resources}/ecj.javadocs.prefs").absolutePath ]
- doFirst {
- tmpDst.mkdirs()
+ // We depend on modular paths.
+ def modularPaths = sourceSet.modularPaths
+ dependsOn modularPaths.compileModulePathConfiguration
+
+ task.argumentProviders.add((CommandLineArgumentProvider) {
Review comment:
To reproduce run the gradle build "precommit" in a checkout with
whitepsace in path name.
##########
File path: gradle/validation/ecj-lint.gradle
##########
@@ -72,22 +83,41 @@ allprojects {
args += [ "-enableJavadoc" ]
args += [ "-properties",
file("${resources}/ecj.javadocs.prefs").absolutePath ]
- doFirst {
- tmpDst.mkdirs()
+ // We depend on modular paths.
+ def modularPaths = sourceSet.modularPaths
+ dependsOn modularPaths.compileModulePathConfiguration
+
+ task.argumentProviders.add((CommandLineArgumentProvider) {
Review comment:
More details with `--info` enabled:
```
> Task :lucene:core:ecjLintMain FAILED
Caching disabled for task ':lucene:core:ecjLintMain' because:
Build cache is disabled
Task ':lucene:core:ecjLintMain' is not up-to-date because:
No history is available.
Starting process 'command 'C:\Program Files\Java\jdk-11.0.13\bin\java.exe''.
Working directory: C:\Users\Uwe
Schindler\Projects\lucene\lucene\lucene\core\build\tmp\ecjLintMain Command:
C:\Program Files\Java\jdk-11.0.13\bin\java.exe -XX:+UseParallelGC
-XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -Duser.country=DE
-Duser.language=de -Duser.variant -cp C:\Users\Uwe
Schindler\.gradle\caches\modules-2\files-2.1\org.eclipse.jdt\ecj\3.27.0\b9f4002cc13e414f303d6c3b9736b0efb505c9b8\ecj-3.27.0.jar
org.eclipse.jdt.internal.compiler.batch.Main -d none -source 11 -target 11
-encoding UTF-8 -proc:none -nowarn -enableJavadoc -properties C:\Users\Uwe
Schindler\Projects\lucene\lucene\gradle\validation\ecj-lint\ecj.javadocs.prefs
@C:\Users\Uwe
Schindler\Projects\lucene\lucene\lucene\core\build\tmp\ecjLintMain\ecj-inputs.txt
Successfully started process 'command 'C:\Program
Files\Java\jdk-11.0.13\bin\java.exe''
Unrecognized option : C:\Users\Uwe
:lucene:core:ecjLintMain (Thread[Execution worker for ':' Thread 2,5,main])
completed. Took 1.923 secs.
```
##########
File path: gradle/validation/ecj-lint.gradle
##########
@@ -72,22 +83,41 @@ allprojects {
args += [ "-enableJavadoc" ]
args += [ "-properties",
file("${resources}/ecj.javadocs.prefs").absolutePath ]
- doFirst {
- tmpDst.mkdirs()
+ // We depend on modular paths.
+ def modularPaths = sourceSet.modularPaths
+ dependsOn modularPaths.compileModulePathConfiguration
+
+ task.argumentProviders.add((CommandLineArgumentProvider) {
Review comment:
There seem to be no quotes at all, but I am not sure if this is printed
correctly by gradle.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]