Skip to content

Fix: CheckerFramework version bump#393

Open
byd110 wants to merge 2 commits into
vehiloco:masterfrom
byd110:fix/cfversionbump3.49.3
Open

Fix: CheckerFramework version bump#393
byd110 wants to merge 2 commits into
vehiloco:masterfrom
byd110:fix/cfversionbump3.49.3

Conversation

@byd110

@byd110 byd110 commented Oct 7, 2025

Copy link
Copy Markdown

The CF version bump #349 fails at the test to compute the greatest lower bound and lowest upper bound. Consider the code snippet:

Problem Description

class test<T extends @AllowedAlgorithms({"a", "b"}) String> {}

void m() {
        test<? extends @AllowedAlgorithms({"a", "c"}) String> f1 = new test<>();
}

Here the object creation should be valid if we compute the lub as @AllowedAlgorithms({"a"}) String. However, in the handling before 3.43.0 release is that it takes the upper bound at class decl directly, which is @AllowedAlgorithms({"a", "b"}. Hence, here was expected an assignment.type.incompatible error before.

Solution

By removing this type of error specifications, and adapt the change of CF APIs (some signatures changed from BaseTypeChecker to SourceChecker), the build succeed.

@byd110 byd110 marked this pull request as ready for review October 7, 2025 02:51
@byd110

byd110 commented Oct 7, 2025

Copy link
Copy Markdown
Author

add new test cases to test that extends "c" is rejected.

@wmdietl wmdietl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking down the version update problems!

}

void testGlb1() {
// ::error: (assignment.type.incompatible)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the removed errors, can you instead say what the effective bound is?
I think it's fine that we no longer get the assignment errors, but the effective bounds should still give us the desired behavior. Is that the case?

checkerFramework: "3.42.0-eisop5",
]

//def checkerframework_local = true // Set this variable to [true] while using local version of checker framework.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these can be removed, as nobody uses the variables.

@@ -10,6 +10,9 @@ ext.versions = [
checkerFramework: "3.42.0-eisop5",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you look for all uses of the version string and update them together?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants