Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9665

Scala compiler not producing unused warnings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • build
    • None

    Description

      While reviewing KAFKA-9661, I wondered about the compiler giving us a warning for unused locals. I ran the build locally and didn't see any warnings. Turns out Scala 2.12 doesn't support the compiler flag -Xlint:unused. Since we build with 2.12 by default, we can easily miss these warnings.

      We should instead use -Ywarn-unused:locals and others which work for scalac 2.12 and 2.13.

      Attachments

        Activity

          People

            mumrah David Arthur
            mumrah David Arthur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: