From fde9c6ea4a718d8e1b9f01bc545cdcaa64ec74ee Mon Sep 17 00:00:00 2001 From: Allison Portis Date: Wed, 1 May 2024 15:49:00 -0700 Subject: [PATCH 1/3] upgrade versions --- build.sbt | 2 +- project/plugins.sbt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index c63954d9040..647faa9d6d4 100644 --- a/build.sbt +++ b/build.sbt @@ -1308,7 +1308,7 @@ def javaCheckstyleSettings(checkstyleFile: String): Def.SettingsDefinition = { // and during tests (e.g. build/sbt test) Seq( checkstyleConfigLocation := CheckstyleConfigLocation.File(checkstyleFile), - checkstyleSeverityLevel := Some(CheckstyleSeverityLevel.Error), + checkstyleSeverityLevel := CheckstyleSeverityLevel.Error, (Compile / checkstyle) := (Compile / checkstyle).triggeredBy(Compile / compile).value, (Test / checkstyle) := (Test / checkstyle).triggeredBy(Test / compile).value ) diff --git a/project/plugins.sbt b/project/plugins.sbt index 674539b6a59..79e0da3f54d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -45,7 +45,7 @@ libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionSch addSbtPlugin("net.aichler" % "sbt-jupiter-interface" % "0.9.1") -addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1") +addSbtPlugin("software.purpledragon" % "sbt-checkstyle-plugin" % "4.0.1") // By default, sbt-checkstyle-plugin uses checkstyle version 6.15, but we should set it to use the // same version as Spark -dependencyOverrides += "com.puppycrawl.tools" % "checkstyle" % "8.43" +dependencyOverrides += "com.puppycrawl.tools" % "checkstyle" % "9.3" From 720a8fb5564fc30f2649c929e498191c0db36bd4 Mon Sep 17 00:00:00 2001 From: Allison Portis Date: Thu, 2 May 2024 10:59:26 -0700 Subject: [PATCH 2/3] Actually fail compile/test correctly --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 647faa9d6d4..d74e8bae85e 100644 --- a/build.sbt +++ b/build.sbt @@ -1309,8 +1309,8 @@ def javaCheckstyleSettings(checkstyleFile: String): Def.SettingsDefinition = { Seq( checkstyleConfigLocation := CheckstyleConfigLocation.File(checkstyleFile), checkstyleSeverityLevel := CheckstyleSeverityLevel.Error, - (Compile / checkstyle) := (Compile / checkstyle).triggeredBy(Compile / compile).value, - (Test / checkstyle) := (Test / checkstyle).triggeredBy(Test / compile).value + (Compile / compile) := ((Compile / compile) dependsOn (Compile / checkstyle)).value, + (Test / test) := ((Test / test) dependsOn (Test / checkstyle)).value ) } From a632bd5205b0a34c68748669ce231a2d6f705c3e Mon Sep 17 00:00:00 2001 From: Allison Portis Date: Thu, 2 May 2024 11:36:05 -0700 Subject: [PATCH 3/3] Fix flink checkstyle --- build.sbt | 6 +++--- .../io/delta/flink/internal/KernelSnapshotWrapper.java | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index d74e8bae85e..d5bd960fb0c 100644 --- a/build.sbt +++ b/build.sbt @@ -1212,9 +1212,9 @@ lazy val flink = (project in file("connectors/flink")) IO.write(file, s"""package io.delta.flink.internal; | - |final public class Meta { - | public static final String FLINK_VERSION = "${flinkVersion}"; - | public static final String CONNECTOR_VERSION = "${version.value}"; + |public final class Meta { + | public static final String FLINK_VERSION = "${flinkVersion}"; + | public static final String CONNECTOR_VERSION = "${version.value}"; |} |""".stripMargin) Seq(file) diff --git a/connectors/flink/src/main/scala/io/delta/flink/internal/KernelSnapshotWrapper.java b/connectors/flink/src/main/scala/io/delta/flink/internal/KernelSnapshotWrapper.java index 8d8bf84c449..78b16c11337 100644 --- a/connectors/flink/src/main/scala/io/delta/flink/internal/KernelSnapshotWrapper.java +++ b/connectors/flink/src/main/scala/io/delta/flink/internal/KernelSnapshotWrapper.java @@ -23,11 +23,10 @@ import java.util.List; import java.util.Optional; +import io.delta.kernel.data.ColumnVector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.delta.kernel.data.ColumnVector; - import io.delta.standalone.DeltaScan; import io.delta.standalone.actions.AddFile; import io.delta.standalone.actions.Metadata;