You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
literally 3000 lines of warnings in the build (!!!)
I clone it locally
Looks like this is the failure
* What went wrong:
Execution failed for task ':lib:compileJavaParserJava'.
> Compilation failed; see the compiler output below.
/Users/ntwigg/Documents/dev/spotless/lib/src/javaParser/java/com/diffplug/spotless/glue/javaParser/ExpandWildcardsFormatterFunc.java:95: error: [CollectorMutability] Avoid `Collectors.to{List,Map,Set}` in favor of collectors that emphasize (im)mutability
.collect(toMap(Function.identity(),
^
(see https://error-prone.picnic.tech/bugpatterns/CollectorMutability)
Did you mean '.collect(toImmutableMap(Function.identity(),' or 't -> new TreeSet<>(Comparator.comparing(ImportDeclaration::getNameAsString)), (a, b) -> { throw new IllegalStateException(); }, HashMap::new));'?
1 error
I like immutability, but the warning above is not easy to fix. We don't have guava, toMap is a good choice here.
@Pankraz76 The feature in the PR is more important than the rule-check. When rule-checking is consuming more reviewer time than actual PRs, something is wrong. For this reason, I removed error-prone fom the build in the above-mentioned PR.
I haven't been paying attention to our ErrorProne setup, so I don't know which rules we had previously enabled.
Usually, the rules that come out-of-the-box and are enabled by default are a good baseline, because they're based on Google's internal lessons on which rules produce many false positives and which don't. Are we seeing problems from these rules, or any other rules that we've enabled, or both?
The way I see it, it would be worth reintroducing ErrorProne with just the enabled-by-default rules and slowly reintroduce others like the Picnic ones over time.
What do you think, both?
Reacted by Vincent Potuček, Liam Miller-Cushon and Rick Ossendrijver
12 hrs ago I notice it exists. It's blocked on me because I need to approve CI to run.
I look at the code, great little feature, people have asked for it for years, tight implementation, updated changelog, looks like I can just "approve CI", "enable automerge" and the PR submitter and I are both done
10 hrs later I notice it hasn't merged. CI failed. Huh. sanityCheck failed
rewriteDryRun failed. There are 8,000 lines of warnings, hard for new contributor to tell what's going on, I know the answer is gradlew rewriteRun so I drop a comment
1 hr ago the author sees it, switches context, runs the command, pushes it up
just one I notice he pushed, I approve CI again and enable automerge, and now the feature has landed. Huzzah!
I like what rewrite did here, it's better! In sum, for this particular PR:
Benefit: slightly safer pattern for avoiding NPE
Cost: 2 context switches for me, 1 context switch for the PR submitter
So the choice to keep errorProne and rewrite is about cost/benefit. Maybe we trigger rewriteRun so that it runs when spotlessApply runs? One less thing for contributors to learn? The trouble is it's pretty slow and throws so many warnings...
@nedtwigg That's fair. Despite my love for error-prone, I totally acknowledge that the current setup is consuming a lot of your time and this whole thing has been raising your hackles, so I'm happy enough to remove it and I'd totally understand if you want nothing to do with it. :)
You are correct I am conflating them. error-prone was creating a huge number of warnings, and you fixed that (and so it is stil in the build). rewrite is mostly separate, being discussed on its own in #2825.
Activity
Pankraz76 commentedon Nov 21, 2025
I agree — it isn’t very pleasant or kind to use, or integrate, and sometimes it feels overwhelming and spam-like.
Pankraz76 commentedon Nov 21, 2025
-XepDisableAllWarningsmight was the missing key and should be the cure of this madness.Idk whats the point, beside the spamming yes, as warnings are just optional?
jbduncan commentedon Nov 21, 2025
I haven't been paying attention to our ErrorProne setup, so I don't know which rules we had previously enabled.
Usually, the rules that come out-of-the-box and are enabled by default are a good baseline, because they're based on Google's internal lessons on which rules produce many false positives and which don't. Are we seeing problems from these rules, or any other rules that we've enabled, or both?
The way I see it, it would be worth reintroducing ErrorProne with just the enabled-by-default rules and slowly reintroduce others like the Picnic ones over time.
What do you think, both?
[prone] apply `-XepDisableAllWarnings`
[prone] apply `-XepDisableAllWarnings`
[prone] apply `-XepDisableAllWarnings`
[prone] apply `-XepDisableAllWarnings`
Pankraz76 commentedon Nov 21, 2025
thanks for your diplomatic support in guiding/guarding the overall quality goals.
This should fix the massiv output, also referring in:
-XepDisableAllWarnings#2754StaticImport,NonStaticImport#2743[prone] diable warning `CollectorMutability`, fix warning `StaticImport`
[prone] diable warning `CollectorMutability`, fix warning `MissingOve…
[prone] diable warning `CollectorMutability`, fix warning `MissingOve…
[prone] diable warning `CollectorMutability`, fix warning `MissingOve…
[prone] diable warning `CollectorMutability`, fix warning `MissingOve…
[prone] fix warning `StaticImport`
[prone] fix warning `StaticImport`
[prone] fix warning `StaticImport`
[prone] remove failing `tech.picnic.error-prone-support`
[prone] remove failing `tech.picnic.error-prone-support`
[prone] remove failing `tech.picnic.error-prone-support`
[prone] remove failing `tech.picnic.error-prone-support`
Pankraz76 commentedon Nov 22, 2025
zero warnings as requested:
tech.picnic.error-prone-support#2766nedtwigg commentedon Nov 22, 2025
Here's an example (of rewrite, not error-prone)
sanityCheckfailedrewriteDryRunfailed. There are 8,000 lines of warnings, hard for new contributor to tell what's going on, I know the answer isgradlew rewriteRunso I drop a commentI like what rewrite did here, it's better! In sum, for this particular PR:
So the choice to keep errorProne and rewrite is about cost/benefit. Maybe we trigger
rewriteRunso that it runs whenspotlessApplyruns? One less thing for contributors to learn? The trouble is it's pretty slow and throws so many warnings...jbduncan commentedon Nov 22, 2025
@nedtwigg That's fair. Despite my love for error-prone, I totally acknowledge that the current setup is consuming a lot of your time and this whole thing has been raising your hackles, so I'm happy enough to remove it and I'd totally understand if you want nothing to do with it. :)
nedtwigg commentedon Jan 21, 2026
Pankraz76 commentedon Jan 21, 2026
sorry but rewrite and prone are actually 2 different kind even tho they kind of the same, there is still a difference.
you complaining about prone but remove rewrite this seems kind of questionable.
nedtwigg commentedon Jan 21, 2026
You are correct I am conflating them. error-prone was creating a huge number of warnings, and you fixed that (and so it is stil in the build). rewrite is mostly separate, being discussed on its own in #2825.