eisop / checker-framework

Pluggable type-checking for Java
https://eisop.github.io/
Other
17 stars 16 forks source link

Fix handling of `-Astubs=checker.jar/` #666

Closed wmdietl closed 7 months ago

wmdietl commented 7 months ago

Handling of -Astubs=checker.jar/ doesn't seem to correctly handle stub files that are with the checker or in the root directory. https://github.com/eisop/checker-framework/pull/665/commits/8d0b965d41cb646dfc0a23693510a50306d6e04f fixed handling for stub files with the checker. For stub files in the root directory, one currently has to pass -Astubs=checker.jar//file.astub (note the two //). This isn't documented. Investigate what the best solution for handling this flag is.

wmdietl commented 7 months ago

Also make sure that the @StubFiles({"junit-assertions.astub"}) (https://github.com/eisop/checker-framework/blob/666705f1b1b29e3f154079725320e6c0ad0c225c/checker/src/main/java/org/checkerframework/checker/nullness/NullnessChecker.java#L57) loads the correct stub file - there are two files with that name in the repo. Should both be loaded?