This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new fa13a01 [SPARK-34774][BUILD] Ensure change-scala-version.sh update
scala.version in parent POM correctly
fa13a01 is described below
commit fa13a013a2bb316a7d6fcce58f0d721bcc19588f
Author: yangjie01 <[email protected]>
AuthorDate: Thu Mar 18 07:33:23 2021 -0500
[SPARK-34774][BUILD] Ensure change-scala-version.sh update scala.version in
parent POM correctly
### What changes were proposed in this pull request?
After SPARK-34507, execute` change-scala-version.sh` script will update
`scala.version` in parent pom, but if we execute the following commands in
order:
```
dev/change-scala-version.sh 2.13
dev/change-scala-version.sh 2.12
git status
```
there will generate git diff as follow:
```
diff --git a/pom.xml b/pom.xml
index ddc4ce2f68..f43d8c8f78 100644
--- a/pom.xml
+++ b/pom.xml
-162,7 +162,7
<commons.math3.version>3.4.1</commons.math3.version>
<commons.collections.version>3.2.2</commons.collections.version>
- <scala.version>2.12.10</scala.version>
+ <scala.version>2.13.5</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version>
<scalafmt.parameters>--test</scalafmt.parameters>
```
seem 'scala.version' property was not update correctly.
So this pr add an extra 'scala.version' to scala-2.12 profile to ensure
change-scala-version.sh can update the public `scala.version` property
correctly.
### Why are the changes needed?
Bug fix.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
**Manual test**
Execute the following commands in order:
```
dev/change-scala-version.sh 2.13
dev/change-scala-version.sh 2.12
git status
```
**Before**
```
diff --git a/pom.xml b/pom.xml
index ddc4ce2f68..f43d8c8f78 100644
--- a/pom.xml
+++ b/pom.xml
-162,7 +162,7
<commons.math3.version>3.4.1</commons.math3.version>
<commons.collections.version>3.2.2</commons.collections.version>
- <scala.version>2.12.10</scala.version>
+ <scala.version>2.13.5</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version>
<scalafmt.parameters>--test</scalafmt.parameters>
```
**After**
No git diff.
Closes #31865 from LuciferYang/SPARK-34774.
Authored-by: yangjie01 <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit 2e836cdb598255d6b43b386e98fcb79b70338e69)
Signed-off-by: Sean Owen <[email protected]>
---
pom.xml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pom.xml b/pom.xml
index 80fcc55..1a42165 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3173,6 +3173,13 @@
<profile>
<id>scala-2.12</id>
+ <properties>
+ <!--
+ SPARK-34774 Add this property to ensure change-scala-version.sh can
replace the public `scala.version`
+ property correctly.
+ -->
+ <scala.version>2.12.10</scala.version>
+ </properties>
<build>
<pluginManagement>
<plugins>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]