Open smillst opened 5 years ago
Should this issue be in the issue tracker of eisop/checker-framework?
Note that CheckerMain automatically does this: https://github.com/eisop/checker-framework/blob/master/framework/src/main/java/org/checkerframework/framework/util/CheckerMain.java#L396
So adding all the -J--add-opens
flags is only needed if the CF is used without CheckerMain.
Is there anything left to do for this issue or can it be closed?
Given that most build tools do not use CheckerMain, it would make using the framework with Java 9+ easier if -J--add-opens
were not required. This shouldn't block merging eisop though, so let's discuss this further at a future meeting.
I'm not so worried about the -J--add-opens
, as it is for a relatively small number of packages. As these compiler packages are internal, I don't think there is a way around the add-opens.
For supporting the annotated JDK, we will need a much larger number of --patch-module
directives that people will have to copy into their build files, if they can't use CheckerMain.
@wmdietl @smillst @mernst
For supporting the annotated JDK, we will need a much larger number of --patch-module directives that people will have to copy into their build files, if they can't use CheckerMain.
One possible solution I could think of is to make our own maven plugin(we already have gradle plugin), this would
-J-add-opens
and --patch-module
arguments.--patch-module
for new modules added, to the updated version of the plugin.Creating a Maven plugin is a great idea. I have created an issue to track that enhancement.
We had a Maven plugin once, but it did not work well. Other people have promised to create one, but have not followed through. The fundamental problem is that we have not yet found someone with enough knowledge of Maven internals to create a good plugin.
Using the eisop fork of CF:
Warning:
org.checkerframework.javacutil.Resolver is used by the FlowExpressionParser to access the element corresponding to FlowExpressions.
The warning can be suppressed by adding -J--add-opens options: