Skip to content

chore: Clear remaining Scala 2.13 warnings under the strict-warnings profile #5893

Description

@athlcode

After #5876, -Pstrict-warnings passes on the Scala 2.12 profiles and CI enforces it for Spark 3.5. The Scala 2.13 profiles still fail. ./mvnw test-compile -Pspark-4.0 -Pstrict-warnings reported 100 warnings at the time #5876 was opened (83 main, 17 test), nearly all in categories 2.12 does not raise:

  • -Xlint:nonlocal-return (42): a return inside a closure, which the compiler implements by throwing. 17 are in CometIcebergNativeWrite.scala.
  • Non-exhaustive matches (20).
  • 2.13 collection deprecations (11): JavaConverters, Stream, MapOps.retain.
  • A handful of widenings, shadowed names and inferred Any/Object.

These were left out of #5876 because the first two need control-flow changes rather than annotations.

Done when ./mvnw test-compile -Pspark-4.0 -Pstrict-warnings -DskipTests passes and the strict-scala-warnings CI job also covers a 2.13 profile.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions