Skip to content

Commit

Permalink
Downgrade Checker Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Jan 13, 2024
1 parent abff73e commit de11e8f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (project.hasProperty("epApiVersion")) {

def versions = [
asm : "9.3",
checkerFramework : "3.41.0",
checkerFramework : "3.40.0",
// for comparisons in other parts of the build
errorProneLatest : latestErrorProneVersion,
// The version of Error Prone used to check NullAway's code.
Expand Down
3 changes: 3 additions & 0 deletions nullaway/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ dependencies {
testImplementation deps.test.mockito
testImplementation deps.test.javaxAnnotationApi
testImplementation deps.test.assertJ
// This is for a test exposing a CFG construction failure in the Checker Framework. We can probably remove it once
// the issue is fixed upstream and we update.
testImplementation 'org.apache.spark:spark-sql_2.12:3.3.2'
}

javadoc {
Expand Down
24 changes: 24 additions & 0 deletions nullaway/src/test/java/com/uber/nullaway/NullAwayCoreTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -960,4 +960,28 @@ public void primitiveCastsRememberNullChecks() {
"}")
.doTest();
}

/**
* This test exposes a failure in CFG construction in Checker Framework 3.41.0 and above. Once a
* fix for this issue makes it to a Checker Framework release, we can probably remove this test.
*/
@Test
public void cfgConstructionSymbolCompletionFailure() {
defaultCompilationHelper
.addSourceLines(
"Test.java",
"package com.uber;",
"import org.apache.spark.sql.SparkSession;",
"class Test {",
" static class X {",
" X(SparkSession session) {}",
" }",
" X run() {",
" try (SparkSession session = SparkSession.builder().getOrCreate()) {",
" return new X(session);",
" }",
" }",
"}")
.doTest();
}
}

0 comments on commit de11e8f

Please sign in to comment.