RFR: 8349847: Support configuring individual lint categories as errors
Archie Cobbs
acobbs at openjdk.org
Wed Apr 2 14:43:56 UTC 2025
On Wed, 2 Apr 2025 14:32:27 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> This PR refines the `-Werror` flag to support lint categories just like `-Xlint` does. So, for example `-Werror:all,-preview` would cause an error if any warning other than a `preview` warning occurred.
>>
>> A few notes:
>> * Some warnings emitted by the compiler do not have a corresponding `Lint` category. As always, they cause an error if `-Werror` is given, but what if `-Werror:all` is given instead? The answer given here is yes, an error will occur.
>> * The `-Werror` works the same way as before, i.e., any warning results in an error. That means if `-Werror` is given `-Werror:foo` flags have no effect.
>> * Refactoring has been done to allow `-Xlint` and `-Werror` to utilize the same "parsing" logic. The existing `-Xlint` flag has a particular behavior when conflicting flags are combined (e.g., `-Xlint:all -Xlint:none -Xlint:foo -Xlint:-foo` equals `-Xlint:all`). This behavior has been preserved and Javadocumented.
>> * A few minor cleanups are included
>
> Can we please hold off on this for now? There's many `lint`-related improvements going on at the same time, and, while it's good to see some activity in this area, I'd like to proceed in a more incremental fashion. Let's try to clear up the queue before we add more to it.
Hi @mcimadamore,
Certainly - I was only trying to stave off the bot, not implying impatience.
Maybe we need a new bot command like `/keep-alive 8w` that could change the idle timeout setting... ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23622#issuecomment-2772785648
More information about the compiler-dev
mailing list