From ed4847ffe07e60d8cf9a01c2855ef32626ae081b Mon Sep 17 00:00:00 2001 From: panbingkun Date: Sat, 12 Oct 2024 20:31:05 +0900 Subject: [PATCH] [SPARK-49937][INFRA] Ban call the method `SparkThrowable#getErrorClass` ### What changes were proposed in this pull request? The pr aims to ban call the method `SparkThrowable#getErrorClass`. ### Why are the changes needed? After PR https://github.com/apache/spark/pull/48196, `SparkThrowable#getErrorClass` has been marked as `Deprecated`. In order to prevent future developers from calling `SparkThrowable#getErrorClass` again, which may require continuous fix and migration, calling `SparkThrowable#getErrorClass` is strictly prohibited as it will fail at the compilation level. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - Pass GA. - Manually test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48426 from panbingkun/SPARK-49937. Authored-by: panbingkun Signed-off-by: Hyukjin Kwon --- pom.xml | 4 ++++ project/SparkBuild.scala | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bfaee1be609c0..3da8b9ef68b90 100644 --- a/pom.xml +++ b/pom.xml @@ -3075,6 +3075,10 @@ reduce the cost of migration in subsequent versions. --> -Wconf:cat=deprecation&msg=it will become a keyword in Scala 3:e + + -Wconf:cat=deprecation&msg=method getErrorClass in trait SparkThrowable is deprecated:e -Xss128m diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 5882fcbf336b0..737efa8f7846b 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -254,7 +254,9 @@ object SparkBuild extends PomBuild { // reduce the cost of migration in subsequent versions. "-Wconf:cat=deprecation&msg=it will become a keyword in Scala 3:e", // SPARK-46938 to prevent enum scan on pmml-model, under spark-mllib module. - "-Wconf:cat=other&site=org.dmg.pmml.*:w" + "-Wconf:cat=other&site=org.dmg.pmml.*:w", + // SPARK-49937 ban call the method `SparkThrowable#getErrorClass` + "-Wconf:cat=deprecation&msg=method getErrorClass in trait SparkThrowable is deprecated:e" ) } )