RFR: 8359493: Refactor how aggregated mandatory warnings are handled in the compiler [v2]
Archie Cobbs
acobbs at openjdk.org
Mon Jun 23 21:22:29 UTC 2025
On Mon, 23 Jun 2025 21:15:15 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Re. default-enabled, I suspect this is used for preview language feature warnings -- e.g. warnings to be issued when (a) preview features have been enabled and (b) the use of a preview language feature has been detected. As JEP 12 says, while it's ok to use suppressible warnings for preview APIs, it is not ok to use suppressible warnings for language features. So, I believe what JEP 12 says is not "default-enabled", but really "always-enabled", or "unsuppressible". (unfortunately the JEP text does some confusion as it uses the term `lint` warning to refer to the unsuppressible warning, when in reality, in javac, the term `lint` is used for warnings that *can* be suppressed).
>
> Also, are there mandatory warnings for which there's no aggregation?
Thanks for your thoughts on that. I will work on a properties file version of this so we can take a look at it. I think this should help make things as "clean" as they can be, while still preserving the existing (slightly wonky) behavior.
Regarding the JEP, there may indeed be some disagreement between what it specifies and what's implemented. If so, adding these flags to the properties file should make that disagreement (a) more obvious and (b) easy to fix.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25810#discussion_r2162551867
More information about the compiler-dev
mailing list