RFR: 8352612: No way to add back lint categories after "none" [v3]
Archie Cobbs
acobbs at openjdk.org
Thu Apr 10 16:33:09 UTC 2025
On Thu, 10 Apr 2025 15:33:45 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Related, as part of this PR it might be needed to do a pass on the man pages, to make sure they are in sync -- I see for instance this:
>>
>> -nowarn
>> Disables warning messages. This option operates the same as the -Xlint:none option.
>>
>> Which would no longer be valid after this change. E.g.
>>
>>
>> javac -Xlint:none -Xlint:serial
>>
>> is not the same as:
>>
>> javac -nowarn -Xlint:serial
>
> I also wonder if the combo `nowarn` + (non-empty lint set) should result in an option warning (as the lint directive will be skipped) ?
I agree with your verbiage comments and also thanks for the reminder about the man page.
Both issues should be addressed in ffede9b0508.
> I also wonder if the combo nowarn + (non-empty lint set) should result in an option warning (as the lint directive will be skipped) ?
I don't think so. For example, it's probably common for people to throw a temporary `-nowarn` into their build process while they work on something. You don't want to have to then _also_ temporarily find and remove the `-Xlint` flags that are normally there (and then remember later to also un-do that).
Put more simply, there's something fishy about having the simple addition of a `-nowarn` flag cause a new warning to appear :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24227#discussion_r2037815253
More information about the compiler-dev
mailing list