Lombok allows disabling of experimental features with the lombok.experimental.flagUsage=error
flag. However, I need to use only one experimental feature and still have it throw some error for the rest of them.
Setting one (eg., superBuilder
) explicitly doesn't seem to help:
lombok.superBuilder.flagUsage = warning
lombok.experimental.flagUsage = error
It is currently not possible to opt in to features. You can only opt out. There has been GitHub issues that propose such a feature, such as this and this. Here is what rzwitserloot said about this in the former,
Feels a little too exotic. We don't add main features lightly, and you can already blanket-disable experimental (right now, a blanket ERROR/WARNING set on all experimentals can NOT be overridden by explicitly mentioning individual features. There's some merit to this but we'd have to document that the more specific stuff overrides the less specific stuff. Hmm, maybe that is obvious enough).
The main problem is that the way the flagUsage system is implemented, this would be a relatively large amount of work, and we're a bit swamped.
So for now, you need to disable all the experimental features individually, except the ones you want to enable.