typetools / typetools/checker-framework
JAIF-based whole program inference known issues
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Discovered while testing stub-backed WPI (#2871).
The failing test is ConflictingAnnotationsTest.java, which will be merged with #2871 but disabled for jaif-based WPI:
// Tests whether inferring an @Sibling1 annotation when another
// @Sibling1 annotation from a different namespace is present causes
// problems.
class ConflictingAnnotationsTest {
int getWPINamespaceSibling1() {
return MethodReturnTest.getSibling1();
}
// This version of Sibling1 is not typechecked - it doesn't
// belong to the checker and instead is defined in the Sibling1.java
// file in this directory.
@Sibling1 int getLocalSibling1() {
return 1;
}
}
There is also the definition of the alternative @Sibling1 annotation in the WPI test directory.
JAIF-based WPI blindly imports testlib.wholeprograminference.qual.Sibling1 annotation, causing a conflicting annotations error to be issued on the return type of the getLocalSibling1 method (which also has WholeProgramInferenceBottom inferred.
The workaround to prevent the jaif-based version from running on this test is to delete the test from the annotated subdirectory before checking for errors after WPI runs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ConflictingAnnotationsTest.java and the alternative Sibling1.java in the WPI test directory, then compare the JAIF-based WPI handling described for #2871. Reproduce the conflicting-annotation error and inspect the annotated subdirectory workaround; done means the test no longer receives the incorrect imported annotation without relying on deleting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100