-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ErrorProne plugin #3460
Add ErrorProne plugin #3460
Conversation
I discovered a downside of our current inner test sub-module configuration. Since the inner Therefore, we should find a way to better handle it. We could make inheriting optional/configurable. Or provide a dedicated I opened a discussion for it |
This is ready for review. I can't get the assertions in the example project right. @lihaoyi Any idea? |
I think this looks good. One question on |
No, it succeeds. It would fail without this options, so it's a nice demontration that options work as expected.
I can't get the example to work. Have a closer look at the enclosing comment. Either I don't expect any output (which make the example usage missing the point) or I don't use that option, making the example less useful. |
got it. Lemme give a shot at fixing the example and see if I can get it working |
Pushed a fix for the example. Turns out The error messages for example tests do suck though. I've lived with them for a while now, but really should do something to make them easier to read |
Thanks. So simple yet hard to catch. |
@lefou I think this looks good to me. If you're happy with it, i can merge it and pay out the bounty using the same details I used before |
This adds a new
ErrorProne
plugin to thecontrib
section of Mill.It provides the
ErrorProneModule
trait
, which can be mixed intoJavaModule
s. Derived modules likeScalaModule
are also supported, as long as they support thejavacOptions
task to configure the Java compiler.We use the Error Prone project as a compiler plugin. Although this is a simple javac compiler plugin, it's usage isn't trivial. Fetching the correct classpath and supplying options can be tricky, since they need to be provided in a special form. Also using with JVMs starting from version 16 requires special options handling due to the new more restrictive module classpath. This plugin is handling all of the known issues and make its use easy for the user.
Additional configuration options are supported via the
errorProneOptions
target.Here is a usage example:
Tasks:
ErrorProneModule
and testsErrorProneModule
in private projectsFix #3447