You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2024/10/12 11:31:15 UTC
(spark) branch master updated: [SPARK-49937][INFRA] Ban call the method `SparkThrowable#getErrorClass`
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new ed4847ffe07e [SPARK-49937][INFRA] Ban call the method `SparkThrowable#getErrorClass`
ed4847ffe07e is described below
commit ed4847ffe07e60d8cf9a01c2855ef32626ae081b
Author: panbingkun <pa...@baidu.com>
AuthorDate: Sat Oct 12 20:31:05 2024 +0900
[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 <pa...@baidu.com>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
pom.xml | 4 ++++
project/SparkBuild.scala | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index bfaee1be609c..3da8b9ef68b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3075,6 +3075,10 @@
reduce the cost of migration in subsequent versions.
-->
<arg>-Wconf:cat=deprecation&msg=it will become a keyword in Scala 3:e</arg>
+ <!--
+ SPARK-49937 ban call the method `SparkThrowable#getErrorClass`
+ -->
+ <arg>-Wconf:cat=deprecation&msg=method getErrorClass in trait SparkThrowable is deprecated:e</arg>
</args>
<jvmArgs>
<jvmArg>-Xss128m</jvmArg>
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 5882fcbf336b..737efa8f7846 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"
)
}
)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org