rules_kotlin icon indicating copy to clipboard operation
rules_kotlin copied to clipboard

Allow to disable annotation processing (aka -proc:none) during Java compilation

Open k15tfu opened this issue 7 months ago • 1 comments

Hi!

This option is not available in kt_javac_options: https://github.com/bazelbuild/rules_kotlin/blob/43a15332ee332a7bbd8fb451b3cfc370e29653c7/src/main/starlark/core/options/opts.javac.bzl#L18-L100

From the docs (see https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javac.html):

-proc: [none, only]
Controls whether annotation processing and compilation are done. -proc:none means that compilation takes place without annotation processing. -proc:only means that only annotation processing is done, without any subsequent compilation.

Related issues: #1311, #1354.

k15tfu avatar Aug 12 '25 21:08 k15tfu

It should get disabled already unless you have a target that only contains java sources https://github.com/bazelbuild/rules_kotlin/blob/43a15332ee332a7bbd8fb451b3cfc370e29653c7/kotlin/internal/jvm/compile.bzl#L886

Bencodes avatar Aug 12 '25 21:08 Bencodes