rmuir opened a new issue, #13240:
URL: https://github.com/apache/lucene/issues/13240
### Description
While working on #13239, I did find another pre-existing condition with
`gradlew regenerate` besides the groovy version not being able to read java 21
.class files.
I think it is new pickiness of the gradle version we are on, that we've just
yet to notice until now. it does not like something about how our tasks depend
on each other:
```
$ ./gradlew regenerate --rerun-tasks
...
> Task :lucene:core:generateForUtilInternal FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task
':lucene:core:generateForUtilInternal' (type 'DefaultTask').
- Gradle detected a problem with the following location:
'/home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/codecs/lucene99/ForUtil.java'.
Reason: Task ':lucene:core:compileJava' uses this output of task
':lucene:core:generateForUtilInternal' without declaring an explicit or
implicit dependency. This can lead to incorrect results being produced,
depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':lucene:core:generateForUtilInternal' as an input of
':lucene:core:compileJava'.
2. Declare an explicit dependency on
':lucene:core:generateForUtilInternal' from ':lucene:core:compileJava' using
Task#dependsOn.
3. Declare an explicit dependency on
':lucene:core:generateForUtilInternal' from ':lucene:core:compileJava' using
Task#mustRunAfter.
For more information, please refer to
https://docs.gradle.org/8.4/userguide/validation_problems.html#implicit_dependency
in the Gradle documentation.
```
It isn't just this one task nor is it just lucene-core. If you try excluding
troublesome tasks such as FOR generation, then you'll just hit it in
StandardTokenizer, exclude that, and you'll just hit the same issue in
lucene-analyzers with more tokenizers there.
**NOTE**: There's a workaround though for now, I moved past the issue like
this:
```console
$ ./gradlew compileJava && ./gradlew regenerate -x compileJava --rerun-tasks
```
--
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]