Skip to content

0.9.0

Latest

Choose a tag to compare

@ethauvin ethauvin released this 13 Nov 01:15
9dc9b9c

Summary

First release: an Error Prone compile operation for bld that runs the Error Prone plugin in-process through javac and reports every diagnostic, not just those of a failed build.

Features

  • Error Prone compilation via javac — ErrorProneOperation.execute() compiles the project's main and test sources with the Error Prone plugin enabled.
    • Uses a custom CompileOperation that captures the full DiagnosticCollector output, so every javac diagnostic is reported, including findings promoted to errors.
  • Automatic version selection — a compatible Error Prone version is chosen for the running JDK:
  • Fail-fast JDK and JVM checks — problems are reported up front with what to do, instead of surfacing later as UnsupportedClassVersionError or IllegalAccessError:
    • unsupported JDK/version pairs are rejected before downloading
    • missing --add-exports/--add-opens are reported with the exact options to add to bld.javaOptions
    • versions older than LAST_JDK17_VERSION remain accepted on JDK 11-16, since their minimum JDK is not known here
  • Full check configuration API — later calls for the same check win:
  • Processor path merging — a project- or customizer-supplied processor path is merged with the Error Prone processor path, recognizing all three spellings:
    • --processor-path <value>
    • --processor-path=<value>
    • -processorpath <value>
    • dangling flags and multiple occurrences are handled
  • Project integration — fromProject(...) picks up the project's compile options, sources, classpath, module path, verbose flag, and module main class.
  • Configurable repositories — repositories(...) selects where the Error Prone jars are downloaded from (Maven Central by default); arguments are validated before the list is replaced.
  • Input validation — values that would split javac's single -Xplugin:ErrorProne … argument are rejected:
    • plugin arguments and check names
    • option names/values and excluded-path regexes
    • patch settings
    • blank values and whitespace or control characters are rejected