Skip to content

Conversation

Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented Aug 6, 2025

@Pankraz76 Pankraz76 force-pushed the into-fix-rewrite-unused branch 6 times, most recently from f80b0b3 to 4172ede Compare August 6, 2025 15:38
@Pankraz76 Pankraz76 marked this pull request as ready for review August 6, 2025 15:39
@Pankraz76
Copy link
Contributor Author

Kindly request some feedback on this.

Thanks for consideration.

@jochenberger
Copy link
Contributor

I hope we can get this merged soon. It might help to eventually replace the fragile Eclipse-based formatters.

@Pankraz76
Copy link
Contributor Author

nice yes in check we have integrated it already:

@nedtwigg
Copy link
Member

I checked this out and it looks great. Except I get lots of errors along these lines:

Scanning sources in project :testlib
Using active styles []
Unable to resolve classpath for sourceSet :testlib:main
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$IllegalResolutionException: Resolution of the configuration ':testlib:runtimeClasspath' was attempted without an exclusive lock. This is unsafe and not allowed.
2 problems were found storing the configuration cache.
- Task `:rewriteDryRun` of type `org.openrewrite.gradle.RewriteDryRunTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
- Task `:rewriteDryRun` of type `org.openrewrite.gradle.RewriteDryRunTask`: invocation of 'Task.project' at execution time is unsupported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:use_project_during_execution

My two requirements for merging this are:

  • a regular build should not have warnings
  • don't add a new CI task, just add it into sanityCheck right after these lines
  • - name: spotlessCheck
    run: ./gradlew spotlessCheck
    - name: assemble testClasses
    run: ./gradlew assemble testClasses

@Pankraz76 Pankraz76 changed the title Add rewrite support Issue #17487: Add StreamRulesRecipes Sep 24, 2025
@Pankraz76 Pankraz76 changed the title Issue #17487: Add StreamRulesRecipes Issue #2634: Add StreamRulesRecipes Sep 24, 2025
@Pankraz76 Pankraz76 force-pushed the into-fix-rewrite-unused branch from 4172ede to 83b88fb Compare September 24, 2025 11:00
@Pankraz76
Copy link
Contributor Author

Changes have been made:

Changes have been made to lib/src/main/java/com/diffplug/spotless/npm/NodeServerLayout.java by:
    tech.picnic.errorprone.refasterrules.StreamRulesRecipes
        tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamFindAnyIsPresentRecipe
Changes have been made to lib/src/main/java/com/diffplug/spotless/npm/FileFinder.java by:
    tech.picnic.errorprone.refasterrules.StreamRulesRecipes
        tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapFirstRecipe
Changes have been made to plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java by:
    tech.picnic.errorprone.refasterrules.StreamRulesRecipes
        tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamOfNullableRecipe

@Pankraz76 Pankraz76 force-pushed the into-fix-rewrite-unused branch 2 times, most recently from 1a749e0 to 13ff4b8 Compare September 24, 2025 11:13
@Pankraz76
Copy link
Contributor Author

even "faster" than spot:

image

@Pankraz76 Pankraz76 force-pushed the into-fix-rewrite-unused branch 2 times, most recently from ac6d9a2 to 0347af7 Compare September 24, 2025 12:00
@nedtwigg
Copy link
Member

nedtwigg commented Sep 24, 2025

  • conflicts with [openrewrite] initial merge and UpgradeToJava17 #2636, since that one is bigger I'm gonna close this one and merge the other
  • please label all these openrewrite PRs as "[openrewrite]"
  • please limit to one open at a time please
  • these are useful, thank you for contributing them, but they change a lot of code so it is somewhat time-consuming for me to review
  • i will try to merge them in a timely manner, but i don't look at Spotless every day so there will be some gaps

@nedtwigg nedtwigg closed this Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants