typetools / typetools/checker-framework
Handle -bootclasspath argument
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
I am trying to get the Checker framework working in the context of a small Android project built with Buck. For Android projects, Buck uses the -bootclasspath argument when invoking javac, with an argument list like:
javac -source 7 -target 7 -g -bootclasspath /Users/msridhar/Library/Android/sdk/platforms/android-24/android.jar:/Users/msridhar/Library/Android/sdk/platforms/android-24/optional/org.apache.http.legacy.jar -d /Users/msridhar/my-first-buck-project/buck-out/bin/java/com/example/activity/lib__activity__classes -classpath '' @buck-out/gen/java/com/example/activity/__activity__srcs
It looks like the CheckerMain javac wrapper doesn't handle -bootclasspath correctly. This regular expression won't match the -bootclasspath argument, so I think the argument will still get passed to the underlying javac library. This leads to a warning that the annotated JDK is not being used. (I'm not sure how exactly javac handles seeing both -bootclasspath and -Xbootclasspath/p: arguments.)
Other related arguments that are not handled are -Xbootclasspath/a: and -Xbootclasspath/: (as far as I can see), as mentioned here. Properly handling combinations of these arguments may be a bit tricky; it's unclear how javac handles it from the documentation.
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 in framework/src/org/checkerframework/framework/util/CheckerMain.java around the regular expression at line 262, then compare it with the javac invocation and bootclasspath options described in the issue. Check how -bootclasspath, -Xbootclasspath/a:, and -Xbootclasspath/: are handled, including combinations, and verify that the annotated JDK warning is resolved without breaking other javac arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100