Conversation
…from NOTE to ERROR
There was a problem hiding this comment.
@vy
Does plugins.adoc need a change too? It still describes the notes as on by default.
Changing the default instead of removing the notes keeps the option useful for people who still want them, and notesSuppressedByDefaultWithoutAffectingMetadataGeneration shows the descriptor files are still written.
One thing has no line to comment on. The collapsible block in plugins.adoc, "Suppressing annotation processor notes in strict build environments", still says both processors emit NOTE-level diagnostics by default and that this option turns them off, and it lists NOTE (default) among the accepted values. The Maven and Gradle snippets under it pass =WARNING, which suppresses nothing now.
CI also failing because of spotless not applied correctly.
|
|
||
| @Test | ||
| void invalidKindValueEmitsWarning() { | ||
| void invalidKindValueDoesNotEmitWarningByDefault() { |
There was a problem hiding this comment.
Can this go back to asserting the warning is printed?
There was a problem hiding this comment.
What do you mean? This test verifies the default behavior, which is to emit no warnings.
| printMessage( | ||
| Diagnostic.Kind.WARNING, | ||
| String.format( | ||
| "%s: unrecognized value `%s` for option `%s`, using default `%s`. Valid values: %s", | ||
| GraalVmProcessor.class.getName(), | ||
| kindValue, | ||
| PluginProcessor.MIN_ALLOWED_MESSAGE_KIND_OPTION, | ||
| Diagnostic.Kind.NOTE, | ||
| Diagnostic.Kind.ERROR, | ||
| Arrays.toString(Diagnostic.Kind.values()))); |
There was a problem hiding this comment.
This warning goes through the filter it is reporting on
| Arrays.toString(Diagnostic.Kind.values()))); | |
| processingEnv | |
| .getMessager() | |
| .printMessage( | |
| Diagnostic.Kind.WARNING, | |
| MESSAGE_PREFIX | |
| + String.format( | |
| "%s: unrecognized value `%s` for option `%s`, using default `%s`. Valid values: %s", | |
| GraalVmProcessor.class.getName(), | |
| kindValue, | |
| PluginProcessor.MIN_ALLOWED_MESSAGE_KIND_OPTION, | |
| Diagnostic.Kind.ERROR, | |
| Arrays.toString(Diagnostic.Kind.values()))); |
There was a problem hiding this comment.
I'm confused with your suggestion. Mind elaborating?
| printMessage( | ||
| Diagnostic.Kind.WARNING, | ||
| String.format( | ||
| "%s: unrecognized value `%s` for option `%s`, using default `%s`. Valid values: %s", | ||
| PluginProcessor.class.getName(), | ||
| kindValue, | ||
| MIN_ALLOWED_MESSAGE_KIND_OPTION, | ||
| Diagnostic.Kind.NOTE, | ||
| Diagnostic.Kind.ERROR, | ||
| Arrays.toString(Diagnostic.Kind.values()))); |
There was a problem hiding this comment.
Same here, a typo in the value prints nothing.
| Arrays.toString(Diagnostic.Kind.values()))); | |
| processingEnv | |
| .getMessager() | |
| .printMessage( | |
| Diagnostic.Kind.WARNING, | |
| MESSAGE_PREFIX | |
| + String.format( | |
| "%s: unrecognized value `%s` for option `%s`, using default `%s`. Valid values: %s", | |
| PluginProcessor.class.getName(), | |
| kindValue, | |
| MIN_ALLOWED_MESSAGE_KIND_OPTION, | |
| Diagnostic.Kind.ERROR, | |
| Arrays.toString(Diagnostic.Kind.values()))); |
@ramanathan1504, good call. Fixed in 5402ef3. |
@ramanathan1504, right. Fixed in d1a559a. |
Fixes #4225