manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.42k stars 125 forks source link

Valid Lombok configuration for multi-module project #501

Closed ojecborec closed 1 month ago

ojecborec commented 1 year ago

What is a proper way to make Manifold and Lombok work together? I have a following project that displays warning when compiling with org.apache.maven.plugins:maven-compiler-plugin:3.11.0.

[INFO] --- compiler:3.11.0:compile (default-compile) @ service ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 1 source file with javac [debug target 17] to target/classes
[WARNING] The following options were not recognized by any processor: '[manifold.strings.simple.disabled]'

It works just fine with version 3.10.1.

[INFO] --- compiler:3.10.1:compile (default-compile) @ service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /.../service/target/classes

Here's the response after removing Lombok annotation processor path and compile with version 3.11.0.

[INFO] --- compiler:3.11.0:compile (default-compile) @ service ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 1 source file with javac [debug target 17] to target/classes

demo.zip

rsmckinney commented 1 year ago

Hi @ojecborec.

TLDR: you can safely ignore this type of warning.

Manifold uses -Akey[=value] javac compiler annotation-style options as a simple, standard way to pass manifold-specific options to the compiler. Although not an annotation processor, manifold can still access these options.

However, as you have discovered, if an annotation processor is used with manifold, such as lombok, the compiler will produce warnings claiming the annotation processor does not acknowledge the Akey options. While technically true, the options are of course used by manifold, therefore you can safely ignore these warnings.

These warnings will be suppressed in a future release.