5

Can the Checker Framework be used with Error Prone? As far as I can tell they fill overlapping purpose as compile time checking, but they don't do all the same things. I use gradle, but I doubt both plugins can be used at the same time (in fact there's an open bug). If doing this by hand on the command line, how could I run both checker and error prone against a file in a single javac call??

xenoterracide
  • 16,274
  • 24
  • 118
  • 243

1 Answers1

4

Update:

You can now run the Checker Framework and Error Prone together.

As of November 2019 (Checker Framework version 3.0.0), the Checker Framework supports Java 8 and Java 11.

As of May 2020 (Error Prone version 2.4.0), the Error Prone team fixed a bug that crashed the Checker Framework when you ran Error Prone and the Checker Framework in the same javac execution.

Original text:

Many organizations run both the Checker Framework and Error Prone (Google and Uber are two examples).

Currently, you need to invoke javac separately for the two tools. The reason for this is that the Checker Framework is built on javac 8 and Error Prone is built on javac 9. The Checker Framework developers are currently working on transitioning to javac 9, at which point a single javac invocation can run both tools.

mernst
  • 7,437
  • 30
  • 45
  • out of curiosity, at that point will both of them run on java 10+? I presume I will eventually want to transition to java 11. – xenoterracide Jun 15 '18 at 05:46
  • Error Prone supports javac 9 but not javac 10. In general, work may be required for each new version of javac. I am not aware of the Error Prone developers' plans with respect to javac 10 and beyond. – mernst Jun 15 '18 at 12:28