Skip to content

Commit

Permalink
Update to Error Prone 2.13.1 and latest Lombok (#588)
Browse files Browse the repository at this point in the history
It seems that some previous Lombok-related crashes in other EP checks have been fixed! 

There are still some false positive warnings (particularly on Java 8), but we can do narrow suppressions for those rather than entirely disabling checks.
  • Loading branch information
msridhar authored Apr 18, 2022
1 parent 0be462a commit f3c1ebf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
epVersion: 2.4.0
- os: macos-latest
java: 11
epVersion: 2.12.0
epVersion: 2.13.1
- os: ubuntu-latest
java: 11
epVersion: 2.12.0
epVersion: 2.13.1
- os: windows-latest
java: 11
epVersion: 2.12.0
epVersion: 2.13.1
- os: ubuntu-latest
java: 17
epVersion: 2.12.0
epVersion: 2.13.1
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
with:
arguments: coveralls
continue-on-error: true
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.12.0' && github.repository == 'uber/NullAway'
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.13.1' && github.repository == 'uber/NullAway'
- name: Check that Git tree is clean after build and test
run: ./.buildscript/check_git_clean.sh
publish_snapshot:
Expand Down
4 changes: 2 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import org.gradle.util.VersionNumber
// The oldest version of Error Prone that we support running on
def oldestErrorProneVersion = "2.4.0"
// Latest released Error Prone version that we've tested with
def latestErrorProneVersion = "2.12.0"
def latestErrorProneVersion = "2.13.1"
// Default to using latest tested Error Prone version, except on Java 8, where 2.10.0 is the last version
// that works
def defaultErrorProneVersion = JavaVersion.current() >= JavaVersion.VERSION_11 ? latestErrorProneVersion : "2.10.0"
Expand Down Expand Up @@ -106,7 +106,7 @@ def test = [
rxjava2 : "io.reactivex.rxjava2:rxjava:2.1.2",
commonsLang3 : "org.apache.commons:commons-lang3:3.8.1",
commonsLang : "commons-lang:commons-lang:2.6",
lombok : "org.projectlombok:lombok:1.18.12",
lombok : "org.projectlombok:lombok:1.18.22",
springBeans : "org.springframework:spring-beans:5.3.7",
springContext : "org.springframework:spring-context:5.3.7",
grpcCore : "io.grpc:grpc-core:1.15.1", // Should upgrade, but this matches our guava version
Expand Down
7 changes: 5 additions & 2 deletions test-java-lib-lombok/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ tasks.withType(JavaCompile) {
if (!name.toLowerCase().contains("test")) {
options.errorprone {
check("NullAway", CheckSeverity.ERROR)
check("UnusedVariable", CheckSeverity.OFF) // We are not the only checker that fails on Lombok
check("MissingBraces", CheckSeverity.OFF) // We are not the only checker that fails on Lombok
option("NullAway:AnnotatedPackages", "com.uber")
option("NullAway:UnannotatedSubPackages", "com.uber.lib.unannotated")
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
// false positive warnings, only on Java 8
check("MissingSummary", CheckSeverity.OFF)
check("SameNameButDifferent", CheckSeverity.OFF)
}
}
}
if (JavaVersion.current().java9Compatible) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@

@Builder
@Data
@SuppressWarnings({
"SameNameButDifferent" /* crashes with EP 2.6.0 */,
"InlineMeInliner" /* crashes with EP 2.7.1 */
})
@SuppressWarnings({"MissingBraces" /* false positive warnings */})
public class LombokDTO {
// Note: Lombok generates a constructor directly into this class that initializes this field, so
// NullAway does not
Expand Down

0 comments on commit f3c1ebf

Please sign in to comment.