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

Scala compiler not producing unused warnings

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      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

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

              Dates

              • Created:
                Updated: