Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN curl -L "https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.tgz"
ENV PATH="/usr/local/sbt/bin:${PATH}"

# thrift
ARG THRIFT_VERSION=0.13.0
ARG THRIFT_VERSION=0.21.0
RUN apk add --no-cache \
build-base \
cmake \
Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ lazy val api = project
crossScalaVersions := supportedVersions,
libraryDependencies ++= spark_sql_provided,
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % "0.13.0", // cannot upgrade this without breaking compatibility
"org.apache.thrift" % "libthrift" % "0.21.0", // cannot upgrade this without breaking compatibility
// "javax.annotation" % "javax.annotation-api" % "1.3.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add shading configuration for Thrift dependency.

The PR description mentions shading, but there's no shading configuration in build.sbt. This is important to avoid dependency conflicts.

Add the following shading configuration to the api project:

assembly / assemblyShadeRules := Seq(
  ShadeRule.rename("org.apache.thrift.**" -> "shaded.org.apache.thrift.@1").inAll
)

"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
"com.novocode" % "junit-interface" % "0.11" % "test",
Expand Down
2 changes: 1 addition & 1 deletion project/ThriftGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object Thrift {
print_and_execute(s"rm -rf $outputPath/$cleanupSuffixPath")
s"mkdir -p $outputPath" !;
print_and_execute(s"thrift -version")
print_and_execute(s"thrift --gen $language -out $outputPath $inputPath")
print_and_execute(s"thrift --gen $language:generated_annotations=suppress -out $outputPath $inputPath")
val files = (PathFinder(new File(outputPath)) ** s"*.${Option(extension).getOrElse(language)}").get()
println("Generated files list")
files.map(_.getPath).foreach { path => println(s" $path") }
Expand Down
Loading