Skip to content
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

[BUG] Consider making 'You aren't using a compiler supported by lombok' diagnostic an error (instead of a warning) #2714

Closed
cushon opened this issue Jan 18, 2021 · 0 comments

Comments

@cushon
Copy link
Contributor

cushon commented Jan 18, 2021

Describe the bug

When lombok runs in a compiler it doesn't support, it logs the following WARNING level diagnostic:

https://github.com/rzwitserloot/lombok/blob/04f17f4dcfbb0e7881d605708467498e3ec56521/src/core/lombok/core/AnnotationProcessor.java#L222

Because the diagnostic is only an error, the compilation can still succeed. In practice, the build will usually failure later when someone tries to reference the methods that lombok would have generated. (bazelbuild/bazel#12837 is an example where the downstream error was seen, but not the warning about the underlying problem.)

I wonder if it that diagnostic should be an error? In cases where the build is going to fail anyways, I think it would be more helpful to fail early with the diagnostic about the unsupported compiler. (Perhaps there are situations where users are relying on this diagnostic being just a warning?)

To Reproduce

The repro is just to run lombok on a compiler it doesn't support, e.g. that isn't javac or ecj.

Version info (please complete the following information):

@cushon cushon changed the title [BUG] Consider making 'You aren't using a compiler supported by lombok' diagnostic (instead of a warning) [BUG] Consider making 'You aren't using a compiler supported by lombok' diagnostic an error (instead of a warning) Jan 21, 2021
cushon added a commit to cushon/lombok that referenced this issue Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant