Correctly enable warnings-as-errors for processor-generated Java code #4936
Labels
enhancement
End user-perceivable enhancements.
Impact: Low
Low perceived user impact (e.g. edge cases).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Z-ibt
Temporary label for Ben to keep track of issues he's triaged.
Is your feature request related to a problem? Please describe.
As part of migrating to Kotlin 1.6 (#4120) the work includes enabling Kotlin's warnings-as-errors and fixing all warnings so that the app build can remain relatively clean long-term. For consistency. Javac's warnings-as-errors was also enabled, however neither setting extends to Java-generated code from a kapt-run processor (see bazelbuild/rules_kotlin#262 (comment)). Until that issue is fixed, we can't enable errors for generated processor code (such as Dagger).
Describe the solution you'd like
Warnings-as-errors should be enabled for all Java & Kotlin code, including for kapt processor-generated code.
Describe alternatives you've considered
The only feasible alternative is not enabling warnings-as-errors which isn't ideal.
Additional context
None.
The text was updated successfully, but these errors were encountered: