Skip to content

Conversation

Pankraz76
Copy link

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

@elasticsearchmachine elasticsearchmachine added v9.2.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Aug 16, 2025
@Pankraz76
Copy link
Author

Now working anymore after the bump. Removing the custom spotless config fixes the issue, but thats not what we want.

=======================================
Elasticsearch Build Hamster says Hello!
  Gradle Version        : 8.14.2
  OS Info               : Mac OS X 15.6 (aarch64)
  JDK Version           : 21.0.7+6-LTS (Eclipse Temurin)
  JAVA_HOME             : /Users/vincent.potucek/.gradle/jdks/eclipse_adoptium-21-aarch64-os_x.2/mandrel-java21-23.1.7.0-Final/Contents/Home
  Random Testing Seed   : 5354B87EC8746976
  In FIPS 140 mode      : false
=======================================

> Task :x-pack:plugin:esql:stringTemplates
context [anonymous] 157:8 attribute NanosMillis isn't defined
context [anonymous] 157:8 attribute NanosMillis isn't defined
context [anonymous] 157:8 attribute NanosMillis isn't defined
context [anonymous] 157:8 attribute NanosMillis isn't defined
context [anonymous] 157:8 attribute NanosMillis isn't defined

> Task :build-tools-internal:spotlessJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':build-tools-internal:spotlessJava'.
> You need to add a repository containing the '[dev.equo.ide:solstice:1.8.1, com.diffplug.durian:durian-swt.os:4.3.1, net.java.dev.jna:jna-platform:5.16.0, org.apache.felix:org.apache.felix.scr:2.2.12, org.eclipse.platform:org.eclipse.core.commands:3.12.300, org.eclipse.platform:org.eclipse.core.contenttype:3.9.600, org.eclipse.platform:org.eclipse.core.expressions:3.9.400, org.eclipse.platform:org.eclipse.core.filesystem:1.11.100, org.eclipse.platform:org.eclipse.core.jobs:3.15.500, org.eclipse.platform:org.eclipse.core.resources:3.22.100, org.eclipse.platform:org.eclipse.core.runtime:3.33.0, org.eclipse.platform:org.eclipse.equinox.app:1.7.300, org.eclipse.platform:org.eclipse.equinox.common:3.20.0, org.eclipse.platform:org.eclipse.equinox.event:1.7.200, org.eclipse.platform:org.eclipse.equinox.preferences:3.11.300, org.eclipse.platform:org.eclipse.equinox.registry:3.12.300, org.eclipse.platform:org.eclipse.equinox.supplement:1.12.0, org.eclipse.jdt:org.eclipse.jdt.core:3.41.0, org.eclipse.jdt:ecj:3.41.0, org.eclipse.platform:org.eclipse.osgi:3.23.0, org.eclipse.platform:org.eclipse.text:3.14.300, org.osgi:org.osgi.service.cm:1.6.1, org.osgi:org.osgi.service.component:1.5.1, org.osgi:org.osgi.service.event:1.4.1, org.osgi:org.osgi.service.metatype:1.4.1, org.osgi:org.osgi.service.prefs:1.1.2, org.osgi:org.osgi.util.function:1.2.0, org.osgi:org.osgi.util.promise:1.3.0]' artifact in 'build.gradle'.
  E.g.: 'repositories { mavenCentral() }'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 8s
819 actionable tasks: 804 executed, 15 up-to-date
➜  elasticsearch git:(bump-spotless)                                                 
➜                                                                                                                                                                                                                                        
➜  elasticsearch git:(bump-spotless) ./gradlew spotlessApply
=======================================
Elasticsearch Build Hamster says Hello!
  Gradle Version        : 8.14.2
  OS Info               : Mac OS X 15.6 (aarch64)
  JDK Version           : 21.0.7+6-LTS (Eclipse Temurin)
  JAVA_HOME             : /Users/vincent.potucek/.gradle/jdks/eclipse_adoptium-21-aarch64-os_x.2/mandrel-java21-23.1.7.0-Final/Contents/Home
  Random Testing Seed   : 72F78378A80DA702
  In FIPS 140 mode      : false
=======================================
> Task :rest-api-spec:spotlessJava FAILED
> Task :benchmarks:spotlessJava FAILED
> Task :docs:spotlessJava FAILED
> Task :client:benchmark:spotlessJava FAILED
> Task :server:spotlessJava FAILED

FAILURE: Build completed with 5 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':rest-api-spec:spotlessJava'.
> You need to add a repository containing the '[dev.equo.ide:solstice:1.8.1, com.diffplug.durian:durian-swt.os:4.3.1, net.java.dev.jna:jna-platform:5.16.0, org.apache.felix:org.apache.felix.scr:2.2.12, org.eclipse.platform:org.eclipse.core.commands:3.12.300, org.eclipse.platform:org.eclipse.core.contenttype:3.9.600, org.eclipse.platform:org.eclipse.core.expressions:3.9.400, org.eclipse.platform:org.eclipse.core.filesystem:1.11.100, org.eclipse.platform:org.eclipse.core.jobs:3.15.500, org.eclipse.platform:org.eclipse.core.resources:3.22.100, org.eclipse.platform:org.eclipse.core.runtime:3.33.0, org.eclipse.platform:org.eclipse.equinox.app:1.7.300, org.eclipse.platform:org.eclipse.equinox.common:3.20.0, org.eclipse.platform:org.eclipse.equinox.event:1.7.200, org.eclipse.platform:org.eclipse.equinox.preferences:3.11.300, org.eclipse.platform:org.eclipse.equinox.registry:3.12.300, org.eclipse.platform:org.eclipse.equinox.supplement:1.12.0, org.eclipse.jdt:org.eclipse.jdt.core:3.41.0, org.eclipse.jdt:ecj:3.41.0, org.eclipse.platform:org.eclipse.osgi:3.23.0, org.eclipse.platform:org.eclipse.text:3.14.300, org.osgi:org.osgi.service.cm:1.6.1, org.osgi:org.osgi.service.component:1.5.1, org.osgi:org.osgi.service.event:1.4.1, org.osgi:org.osgi.service.metatype:1.4.1, org.osgi:org.osgi.service.prefs:1.1.2, org.osgi:org.osgi.util.function:1.2.0, org.osgi:org.osgi.util.promise:1.3.0]' artifact in 'rest-api-spec/build.gradle'.
  E.g.: 'repositories { mavenCentral() }'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':benchmarks:spotlessJava'.
> You need to add a repository containing the '[dev.equo.ide:solstice:1.8.1, com.diffplug.durian:durian-swt.os:4.3.1, net.java.dev.jna:jna-platform:5.16.0, org.apache.felix:org.apache.felix.scr:2.2.12, org.eclipse.platform:org.eclipse.core.commands:3.12.300, org.eclipse.platform:org.eclipse.core.contenttype:3.9.600, org.eclipse.platform:org.eclipse.core.expressions:3.9.400, org.eclipse.platform:org.eclipse.core.filesystem:1.11.100, org.eclipse.platform:org.eclipse.core.jobs:3.15.500, org.eclipse.platform:org.eclipse.core.resources:3.22.100, org.eclipse.platform:org.eclipse.core.runtime:3.33.0, org.eclipse.platform:org.eclipse.equinox.app:1.7.300, org.eclipse.platform:org.eclipse.equinox.common:3.20.0, org.eclipse.platform:org.eclipse.equinox.event:1.7.200, org.eclipse.platform:org.eclipse.equinox.preferences:3.11.300, org.eclipse.platform:org.eclipse.equinox.registry:3.12.300, org.eclipse.platform:org.eclipse.equinox.supplement:1.12.0, org.eclipse.jdt:org.eclipse.jdt.core:3.41.0, org.eclipse.jdt:ecj:3.41.0, org.eclipse.platform:org.eclipse.osgi:3.23.0, org.eclipse.platform:org.eclipse.text:3.14.300, org.osgi:org.osgi.service.cm:1.6.1, org.osgi:org.osgi.service.component:1.5.1, org.osgi:org.osgi.service.event:1.4.1, org.osgi:org.osgi.service.metatype:1.4.1, org.osgi:org.osgi.service.prefs:1.1.2, org.osgi:org.osgi.util.function:1.2.0, org.osgi:org.osgi.util.promise:1.3.0]' artifact in 'benchmarks/build.gradle'.
  E.g.: 'repositories { mavenCentral() }'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':docs:spotlessJava'.
> You need to add a repository containing the '[dev.equo.ide:solstice:1.8.1, com.diffplug.durian:durian-swt.os:4.3.1, net.java.dev.jna:jna-platform:5.16.0, org.apache.felix:org.apache.felix.scr:2.2.12, org.eclipse.platform:org.eclipse.core.commands:3.12.300, org.eclipse.platform:org.eclipse.core.contenttype:3.9.600, org.eclipse.platform:org.eclipse.core.expressions:3.9.400, org.eclipse.platform:org.eclipse.core.filesystem:1.11.100, org.eclipse.platform:org.eclipse.core.jobs:3.15.500, org.eclipse.platform:org.eclipse.core.resources:3.22.100, org.eclipse.platform:org.eclipse.core.runtime:3.33.0, org.eclipse.platform:org.eclipse.equinox.app:1.7.300, org.eclipse.platform:org.eclipse.equinox.common:3.20.0, org.eclipse.platform:org.eclipse.equinox.event:1.7.200, org.eclipse.platform:org.eclipse.equinox.preferences:3.11.300, org.eclipse.platform:org.eclipse.equinox.registry:3.12.300, org.eclipse.platform:org.eclipse.equinox.supplement:1.12.0, org.eclipse.jdt:org.eclipse.jdt.core:3.41.0, org.eclipse.jdt:ecj:3.41.0, org.eclipse.platform:org.eclipse.osgi:3.23.0, org.eclipse.platform:org.eclipse.text:3.14.300, org.osgi:org.osgi.service.cm:1.6.1, org.osgi:org.osgi.service.component:1.5.1, org.osgi:org.osgi.service.event:1.4.1, org.osgi:org.osgi.service.metatype:1.4.1, org.osgi:org.osgi.service.prefs:1.1.2, org.osgi:org.osgi.util.function:1.2.0, org.osgi:org.osgi.util.promise:1.3.0]' artifact in 'docs/build.gradle'.
  E.g.: 'repositories { mavenCentral() }'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':client:benchmark:spotlessJava'.
> You need to add a repository containing the '[dev.equo.ide:solstice:1.8.1, com.diffplug.durian:durian-swt.os:4.3.1, net.java.dev.jna:jna-platform:5.16.0, org.apache.felix:org.apache.felix.scr:2.2.12, org.eclipse.platform:org.eclipse.core.commands:3.12.300, org.eclipse.platform:org.eclipse.core.contenttype:3.9.600, org.eclipse.platform:org.eclipse.core.expressions:3.9.400, org.eclipse.platform:org.eclipse.core.filesystem:1.11.100, org.eclipse.platform:org.eclipse.core.jobs:3.15.500, org.eclipse.platform:org.eclipse.core.resources:3.22.100, org.eclipse.platform:org.eclipse.core.runtime:3.33.0, org.eclipse.platform:org.eclipse.equinox.app:1.7.300, org.eclipse.platform:org.eclipse.equinox.common:3.20.0, org.eclipse.platform:org.eclipse.equinox.event:1.7.200, org.eclipse.platform:org.eclipse.equinox.preferences:3.11.300, org.eclipse.platform:org.eclipse.equinox.registry:3.12.300, org.eclipse.platform:org.eclipse.equinox.supplement:1.12.0, org.eclipse.jdt:org.eclipse.jdt.core:3.41.0, org.eclipse.jdt:ecj:3.41.0, org.eclipse.platform:org.eclipse.osgi:3.23.0, org.eclipse.platform:org.eclipse.text:3.14.300, org.osgi:org.osgi.service.cm:1.6.1, org.osgi:org.osgi.service.component:1.5.1, org.osgi:org.osgi.service.event:1.4.1, org.osgi:org.osgi.service.metatype:1.4.1, org.osgi:org.osgi.service.prefs:1.1.2, org.osgi:org.osgi.util.function:1.2.0, org.osgi:org.osgi.util.promise:1.3.0]' artifact in 'client/benchmark/build.gradle'.
  E.g.: 'repositories { mavenCentral() }'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
==============================================================================

5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':server:spotlessJava'.
> You need to add a repository containing the '[com.google.googlejavaformat:google-java-format:1.24.0]' artifact in 'server/build.gradle'.
  E.g.: 'repositories { mavenCentral() }'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 7s
36 actionable tasks: 10 executed, 26 up-to-date
➜  elasticsearch git:(bump-spotless) ✗ git reset --soft $(git merge-base main HEAD)    

➜  elasticsearch git:(bump-spotless) ✗ 

@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Aug 16, 2025
@@ -59,6 +59,7 @@ public void apply(Project project) {

java.target("src/**/*.java");
java.removeUnusedImports();
java.removeWildcardImports();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please merge

As I have to recreate it, as already mentioned. The code need to be complain to use this feature.

@DaveCTurner or do you want an even bigger PR, as rewrite its not doing it at once i have to run it multiple times.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming most changes are not covered by Spotless, as there are some blind spots—as its the case with every tool, including Rewrite.

It seems I cannot recreate the changes you're requesting, as they aren't achievable through a simple Spotless configuration change.

Since removing unused imports isn't a new task, would it be acceptable to add a plugin specifically for this purpose? This approach would allow for future enhancements, when there is the demand or not.

As there are a log best practises this project could benefit from including:

@breskeby
Copy link
Contributor

Closing this as its mostly a duplicate off effort we invested already in #115750 but had to explicitly roll back due to an issue in the spotless plugin I had raised in diffplug/spotless#2515

@breskeby breskeby closed this Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team needs:triage Requires assignment of a team area label v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants