Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
Description
I sent this to the dev mailing list a few days ago and didn't get a response, so I'm opening this issue and will create a PR for it.
I just cloned main from https://github.com/apache/solr/commit/1135fdfd7c49ff7ef23513ab01b4ee36ffc14f8f and to test that everything was working, before I start making changes, I ran gradlew tidy updateLicenses check -x test just to see that everything would pass https://github.com/apache/solr/blob/main/dev-docs/how-to-contribute.adoc#making-a-new-contribution.
Gradle complains that there's a circular task dependency:
solr>gradlew tidy updateLicenses check -x test
Downloading gradle-wrapper.jar from https://raw.githubusercontent.com/gradle/gradle/v7.6.0/gradle/wrapper/gradle-wrapper.jar
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.6/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the buildFAILURE: Build failed with an exception.
- What went wrong:
Circular dependency between the following tasks:
:errorProneSkipped
--- :localSettings
--- :solr:updateLicenses
+--- :localSettings
+--- :solr:benchmark:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| | +--- :gitStatus
| | | --- :localSettings
| | +--- :localSettings
| | +--- :solr:core:classes
| | | +--- :localSettings
| | | +--- :solr:core:compileJava
| | | | +--- :errorProneSkipped
| | | | +--- :localSettings
| | | | +--- :solr:core:validateSourcePatterns
| | | | | --- :localSettings
| | | | +--- :solr:solrj:compileJava
| | | | | +--- :errorProneSkipped
| | | | | +--- :localSettings
| | | | | --- :solr:solrj:validateSourcePatterns
| | | | | --- :localSettings
| | | | +--- :solr:solrj-streaming:compileJava
| | | | | +--- :errorProneSkipped
| | | | | +--- :localSettings
| | | | | +--- :solr:solrj:compileJava
| | | | | --- :solr:solrj-streaming:validateSourcePatterns
| | | | | --- :localSettings
| | | | --- :solr:solrj-zookeeper:compileJava
| | | | +--- :errorProneSkipped
| | | | +--- :localSettings
| | | | +--- :solr:solrj:compileJava
| | | | --- :solr:solrj-zookeeper:validateSourcePatterns
| | | | --- :localSettings
| | | --- :solr:core:processResources
| | | --- :localSettings
| | --- :solr:core:compileJava
| +--- :solr:solrj:jar
| | +--- :gitStatus
| | +--- :localSettings
| | +--- :solr:solrj:classes
| | | +--- :localSettings
| | | +--- :solr:solrj:compileJava
| | | --- :solr:solrj:processResources
| | | --- :localSettings
| | --- :solr:solrj:compileJava
| +--- :solr:solrj-streaming:jar
| | +--- :gitStatus
| | +--- :localSettings
| | +--- :solr:solrj-streaming:classes
| | | +--- :localSettings
| | | +--- :solr:solrj-streaming:compileJava
| | | --- :solr:solrj-streaming:processResources
| | | --- :localSettings
| | --- :solr:solrj-streaming:compileJava
| +--- :solr:solrj-zookeeper:jar
| | +--- :gitStatus
| | +--- :localSettings
| | +--- :solr:solrj-zookeeper:classes
| | | +--- :localSettings
| | | +--- :solr:solrj-zookeeper:compileJava
| | | --- :solr:solrj-zookeeper:processResources
| | | --- :localSettings
| | --- :solr:solrj-zookeeper:compileJava
| --- :solr:test-framework:jar
| +--- :gitStatus
| +--- :localSettings
| +--- :solr:test-framework:classes
| | +--- :localSettings
| | +--- :solr:test-framework:compileJava
| | | +--- :errorProneSkipped
| | | +--- :localSettings
| | | +--- :solr:core:compileJava
| | | +--- :solr:solrj:compileJava
| | | +--- :solr:solrj-streaming:compileJava
| | | +--- :solr:solrj-zookeeper:compileJava
| | | --- :solr:test-framework:validateSourcePatterns
| | | --- :localSettings
| | --- :solr:test-framework:processResources
| | --- :localSettings
| --- :solr:test-framework:compileJava
+--- :solr:core:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| +--- :solr:test-framework:jar
| --- :solr:modules:analysis-extras:jar
| +--- :gitStatus
| +--- :localSettings
| +--- :solr:modules:analysis-extras:classes
| | +--- :localSettings
| | +--- :solr:modules:analysis-extras:compileJava
| | | +--- :errorProneSkipped
| | | +--- :localSettings
| | | +--- :solr:core:compileJava
| | | +--- :solr:solrj:compileJava
| | | +--- :solr:solrj-streaming:compileJava
| | | +--- :solr:solrj-zookeeper:compileJava
| | | --- :solr:modules:analysis-extras:validateSourcePatterns
| | | --- :localSettings
| | --- :solr:modules:analysis-extras:processResources
| | --- :localSettings
| --- :solr:modules:analysis-extras:compileJava
+--- :solr:distribution:collectJarInfos
| --- :localSettings
+--- :solr:docker:collectJarInfos
| --- :localSettings
+--- :solr:documentation:collectJarInfos
| --- :localSettings
+--- :solr:example:collectJarInfos
| --- :localSettings
+--- :solr:modules:collectJarInfos
| --- :localSettings
+--- :solr:packaging:collectJarInfos
| --- :localSettings
+--- :solr:prometheus-exporter:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:server:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| --- :solr:solrj-zookeeper:jar
+--- :solr:solr-ref-guide:collectJarInfos
| --- :localSettings
+--- :solr:solrj:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:solrj-streaming:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| +--- :solr:test-framework:jar
| --- :solr:modules:sql:jar
| +--- :gitStatus
| +--- :localSettings
| +--- :solr:modules:sql:classes
| | +--- :localSettings
| | +--- :solr:modules:sql:compileJava
| | | +--- :errorProneSkipped
| | | +--- :localSettings
| | | +--- :solr:core:compileJava
| | | +--- :solr:solrj:compileJava
| | | +--- :solr:solrj-streaming:compileJava
| | | +--- :solr:solrj-zookeeper:compileJava
| | | --- :solr:modules:sql:validateSourcePatterns
| | | --- :localSettings
| | --- :solr:modules:sql:processResources
| | --- :localSettings
| --- :solr:modules:sql:compileJava
+--- :solr:solrj-zookeeper:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:test-framework:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| --- :solr:solrj-zookeeper:jar
+--- :solr:webapp:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| --- :solr:solrj-zookeeper:jar
+--- :solr:modules:analysis-extras:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:analytics:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:clustering:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:extraction:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:gcs-repository:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:hadoop-auth:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| +--- :solr:test-framework:jar
| --- :solr:modules:analysis-extras:jar
+--- :solr:modules:hdfs:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| +--- :solr:test-framework:jar
| --- :solr:modules:analysis-extras:jar
+--- :solr:modules:jwt-auth:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:langid:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:ltr:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:opentelemetry:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:s3-repository:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
+--- :solr:modules:scripting:collectJarInfos
| +--- :localSettings
| +--- :solr:core:jar
| +--- :solr:solrj:jar
| +--- :solr:solrj-streaming:jar
| +--- :solr:solrj-zookeeper:jar
| --- :solr:test-framework:jar
--- :solr:modules:sql:collectJarInfos
+--- :localSettings
+--- :solr:core:jar
+--- :solr:solrj:jar
+--- :solr:solrj-streaming:jar
+--- :solr:solrj-zookeeper:jar
+--- :solr:test-framework:jar
--- :solr:modules:analysis-extras:jar- details omitted (listed previously)
- 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.
- Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 28s
2 actionable tasks: 2 executed
Error: Something went wrong. Make sure you're using Java 11 - 19.
After running gradlew on its own I've realised that it's because if the gradle.properties file doesn't exist, the localSettings task gets added as a dependency of all other tasks: https://github.com/apache/solr/blob/f25d77a45c53db09742cb0f9599ee7c9774b87ab/gradle/generation/local-settings.gradle#L123 and, I assume, other tasks are indirectly being added as a dependency of localSettings.
Rather than trying to unpick the task dependencies, it seems like the easiest fix to this is to not have localSettings as a task, and just execute the generation of the gradle.properties inline in the script when they're absent. (Unless there was a specific reason for it needing to be a task?). That removes the circular task dependency.
Attachments
Attachments
Issue Links
- supercedes
-
SOLR-16634 "gradlew check" fails with OOM on fresh clone
- Resolved
- links to