You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "tylerbertrand (via GitHub)" <gi...@apache.org> on 2023/09/20 13:52:59 UTC
[GitHub] [lucene] tylerbertrand opened a new pull request, #12577: Resolve CompileJava task cache miss
tylerbertrand opened a new pull request, #12577:
URL: https://github.com/apache/lucene/pull/12577
### Description
Resolves `CompileJava` cache miss caused by `options.compilerArgs` input difference.
Moved the `apijar` input file to a `CommandLineArgumentProvider` to apply relative path sensitivity, so that changes in the absolute path of the file do not cause a cache miss.
[Task input comparison without fixes](https://ge.solutions-team.gradle.com/c/ndkin5oemsjac/wfrzfdtcomsj6/task-inputs?cacheability=cacheable,overlapping-outputs,validation-failure) shows `options.compilerArgs` input differences causing the `CompileJava` tasks to be needlessly re-executed.
[Task input comparison with cache fixes applied](https://ge.solutions-team.gradle.com/c/uwmxltj3pshhe/alpaezxmm5isc/task-inputs?cacheability=cacheable,overlapping-outputs,validation-failure) shows no input differences.
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] dweiss commented on a diff in pull request #12577: Resolve CompileJava task cache miss
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #12577:
URL: https://github.com/apache/lucene/pull/12577#discussion_r1331954883
##########
gradle/java/core-mrjar.gradle:
##########
@@ -29,20 +29,19 @@ configure(project(":lucene:core")) {
dependencies.add("main${jdkVersion}Implementation", sourceSets.main.output)
tasks.named("compileMain${jdkVersion}Java").configure {
- def apijar = new File(apijars, "jdk${jdkVersion}.apijar")
-
- inputs.file(apijar)
+ def apijar = layout.projectDirectory.file("src/generated/jdk/jdk${jdkVersion}.apijar")
Review Comment:
this was previously relative to 'apijars' variable; now it's fixed under src/generated... - is this intentional?
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] dweiss merged pull request #12577: Resolve CompileJava task cache miss
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss merged PR #12577:
URL: https://github.com/apache/lucene/pull/12577
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] tylerbertrand commented on a diff in pull request #12577: Resolve CompileJava task cache miss
Posted by "tylerbertrand (via GitHub)" <gi...@apache.org>.
tylerbertrand commented on code in PR #12577:
URL: https://github.com/apache/lucene/pull/12577#discussion_r1332210752
##########
gradle/java/core-mrjar.gradle:
##########
@@ -29,20 +29,19 @@ configure(project(":lucene:core")) {
dependencies.add("main${jdkVersion}Implementation", sourceSets.main.output)
tasks.named("compileMain${jdkVersion}Java").configure {
- def apijar = new File(apijars, "jdk${jdkVersion}.apijar")
-
- inputs.file(apijar)
+ def apijar = layout.projectDirectory.file("src/generated/jdk/jdk${jdkVersion}.apijar")
Review Comment:
Sort of - the lazy file API (`RegularFile` in this case) doesn't mix well with the normal, "eager" `File` type. Since other things use `apijars`, I didn't want to have these changes cascade elsewhere in the project by updating that to use the lazy file API. Turns out that was a simple update to make, so I've just pushed a commit making that update, and now the path of `apijar` is relative to the `apijars` variable once again.
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] tylerbertrand commented on a diff in pull request #12577: Resolve CompileJava task cache miss
Posted by "tylerbertrand (via GitHub)" <gi...@apache.org>.
tylerbertrand commented on code in PR #12577:
URL: https://github.com/apache/lucene/pull/12577#discussion_r1332210752
##########
gradle/java/core-mrjar.gradle:
##########
@@ -29,20 +29,19 @@ configure(project(":lucene:core")) {
dependencies.add("main${jdkVersion}Implementation", sourceSets.main.output)
tasks.named("compileMain${jdkVersion}Java").configure {
- def apijar = new File(apijars, "jdk${jdkVersion}.apijar")
-
- inputs.file(apijar)
+ def apijar = layout.projectDirectory.file("src/generated/jdk/jdk${jdkVersion}.apijar")
Review Comment:
Sort of - Gradle's lazy file API (`RegularFile` class in this case) doesn't mix well with the normal, "eager" `File` type. Since other things use `apijars`, I didn't want to have these changes cascade elsewhere in the project by updating that to use the lazy file API. Turns out that was a simple update to make, so I've just pushed a commit making that update, and now the path of `apijar` is relative to the `apijars` variable once again.
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] dweiss commented on a diff in pull request #12577: Resolve CompileJava task cache miss
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #12577:
URL: https://github.com/apache/lucene/pull/12577#discussion_r1332621322
##########
gradle/java/core-mrjar.gradle:
##########
@@ -29,20 +29,19 @@ configure(project(":lucene:core")) {
dependencies.add("main${jdkVersion}Implementation", sourceSets.main.output)
tasks.named("compileMain${jdkVersion}Java").configure {
- def apijar = new File(apijars, "jdk${jdkVersion}.apijar")
-
- inputs.file(apijar)
+ def apijar = layout.projectDirectory.file("src/generated/jdk/jdk${jdkVersion}.apijar")
Review Comment:
Oh, sorry - I thought you'd just replace the string with "${apijars}/jdk${jdkVersion}/.apijar" but I see how this can defeat the purpose of having project-relative paths (if it's a File and resolves to a full path, for example).
LGTM
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org