Reproduction steps
Scala version: 2.13.9
@deprecated("3.0") @nowarn("cat=deprecation")
val MessageFormatVersionDoc = TopicConfig.MESSAGE_FORMAT_VERSION_DOC
public class TopicConfig {
@Deprecated
public static final String MESSAGE_FORMAT_VERSION_DOC = "[DEPRECATED] Specify the message format version the broker " +
"will use to append messages to the logs. The value of this config is always assumed to be `3.0` if " +
"`inter.broker.protocol.version` is 3.0 or higher (the actual config value is ignored). Otherwise, the value should " +
"be a valid ApiVersion. Some examples are: 0.10.0, 1.1, 2.8, 3.0. By setting a particular message format version, the " +
"user is certifying that all the existing messages on disk are smaller or equal than the specified version. Setting " +
"this value incorrectly will cause consumers with older versions to break as they will receive messages with a format " +
"that they don't understand.";
}
The PR that found this problem can be found at apache/kafka#12675 and the build can be seen at https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-12675/4/pipeline/12.
The failure
Problem
There seems to be a regression with the @nowarn annotation, when updating Kafka's Scala version to 2.13.9 the following error message appears
[2022-09-22T14:14:21.289Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-12675/core/src/main/scala/kafka/log/LogConfig.scala:220:23: @nowarn annotation does not suppress any warnings
[2022-09-22T14:14:21.289Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-12675/core/src/main/scala/kafka/log/LogConfig.scala:255:23: @nowarn annotation does not suppress any warnings
[2022-09-22T14:14:21.290Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-12675/core/src/main/scala/kafka/server/KafkaConfig.scala:569:4: @nowarn annotation does not suppress any warnings
This is with no changes to the Scala source code whatsoever. I suspect this may be due to a change in handling of Java source code within scalac since the deprecated code is coming from Java.
Reproduction steps
Scala version: 2.13.9
The PR that found this problem can be found at apache/kafka#12675 and the build can be seen at https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-12675/4/pipeline/12.
The failure
Problem
There seems to be a regression with the
@nowarnannotation, when updating Kafka's Scala version to 2.13.9 the following error message appearsThis is with no changes to the Scala source code whatsoever. I suspect this may be due to a change in handling of Java source code within scalac since the deprecated code is coming from Java.