patching is broken With 2.43.0 for `UnnecessarilyFullyQualified`
Reproducer:
- https://github.com/Pankraz76/spotless/pull/7
Discovered by @delanym
- https://github.com/google/error-prone/issues/5227#issuecomment-3435293868
Could you provide a minimal reproducible example using the Error Prone CLI (https://errorprone.info/docs/installation#command-line)?
I think the issue is with one of the other patches. I add my patches like so
-Dep-patch=DeadException,DefaultCharset,EffectivelyPrivate,MissingOverride,StringConcatToTextBlock,ThrowsUncheckedException,RemoveUnusedImports,UnnecessarilyFullyQualified,UnnecessarilyUsedValue,UnnecessarilyVisible,UnnecessaryAnonymousClass,UnnecessaryAssignment,UnnecessaryBoxedAssignment,UnnecessaryBoxedVariable,UnnecessaryFinal,UnnecessaryLambda,UnnecessaryMethodInvocationMatcher,UnnecessaryMethodReference,UnnecessaryOptionalGet,UnnecessaryParentheses,UnnecessarySetDefault,UnnecessaryTypeArgument,WildcardImport
Patches fail to apply.
-Dep-patch=UnnecessarilyFullyQualified,RemoveUnusedImports
Patches are applied.
I suspect a bug in one of the patches causes the whole lot to break and not apply. Being in the annotation processor the error is gobbled up instead of causing compilation to fail. @cushon can you confirm my idea?
It's hard to say without a minimal self-contained repro.
Sure that's one approach. But every project must have an expected behaviour. Do you expect a bug in a patch to fail silently and break the remaining patches? Is this scenario tested?