You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wayang.apache.org by be...@apache.org on 2021/09/13 18:49:01 UTC

[incubator-wayang] branch main updated: [WAYANG-41] Fix some Scala version issues

This is an automated email from the ASF dual-hosted git repository.

bertty pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-wayang.git


The following commit(s) were added to refs/heads/main by this push:
     new cf142fd  [WAYANG-41] Fix some Scala version issues
     new 9071f6c  Merge pull request #28 from ggevay/travis-scala-version
cf142fd is described below

commit cf142fd3a1ce953a5e43a1fa6016f271e2e7f8a4
Author: Gabor Gevay <gg...@gmail.com>
AuthorDate: Sun Sep 12 17:01:44 2021 +0200

    [WAYANG-41] Fix some Scala version issues
    
    - Travis build
    - build.sh
    - Deprecate the change-scala-version.sh script
---
 .travis.yml                 | 7 ++++---
 bin/build.sh                | 9 ++++-----
 bin/change-scala-version.sh | 2 ++
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bf473fe..84dcf1a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -86,13 +86,14 @@ before_script:
 #  - chmod +x ./docs/script/cibuild
 script:
   #- jdk_switcher use openjdk8
-  - bin/change-scala-version.sh 2.11.12 && mvn clean install -Pdistro,scala-11 "${mvn_opts[@]}" &> result.log
-  - bin/change-scala-version.sh 2.12.12 && mvn clean install -Pdistro,scala-12 "${mvn_opts[@]}" &>> result.log
+  - mvn clean install -Pdistro,scala-11 "${mvn_opts[@]}" &> result.log
+  - mvn clean install -Pdistro,scala-12 "${mvn_opts[@]}" &>> result.log
+  #- mvn clean install -Pdistro,scala-13 "${mvn_opts[@]}" &>> result.log # This is not working for now because of Spark and Flink not supporting Scala 2.13
   - cat /home/travis/build/apache/incubator-wayang/target/rat.txt || echo "file doesn't exist"
   - tail -n 2000 result.log
 
 after_success:
-  # generate the documentation and create a update of the documentation if something change there
+  # generate the documentation and create an update of the documentation if something changes there
   - if [ "${GENERATE_DOCS}" = "true" ] ; then mvn clean gem:exec@bundle-install gem:exec@generate-documentation gem:exec@generate-documentation-as-latest site -pl wayang-docs -Pweb-documentation ; fi
 
 env:
diff --git a/bin/build.sh b/bin/build.sh
index 8bd6e8e..f69be5d 100755
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -48,15 +48,14 @@ if [ "$(pwd)" != "$basedir" ]; then
 fi
 
 
-scala_versions=(2.11.8) # 2.12.2 was not supported as of creating this script
+scala_versions=(scala-11 scala-12)
 failures=()
 successes=()
 
 for scala_version in "${scala_versions[@]}"; do
 	echo "Running 'mvn ${mvn_opts[@]}' with Scala $scala_version..."
 
-	"$basedir/bin/change-scala-version.sh" "$scala_version"
-	if mvn "${mvn_opts[@]}"; then
+	if mvn "${mvn_opts[@]}" -P $scala_version; then
 		successes+=("$scala_version")
 	else
 		failures+=("$scala_version")
@@ -64,7 +63,7 @@ for scala_version in "${scala_versions[@]}"; do
 done
 
 echo "Summary:"
-echo "* Successes with Scala versions ${successes[@]}"
-echo "* Failures with Scala versions ${failures[@]}"
+echo "* Successes with Scala versions: ${successes[@]}"
+echo "* Failures with Scala versions: ${failures[@]}"
 
 exit ${#failures[@]}
diff --git a/bin/change-scala-version.sh b/bin/change-scala-version.sh
index 79f4a32..d3378ce 100755
--- a/bin/change-scala-version.sh
+++ b/bin/change-scala-version.sh
@@ -19,6 +19,8 @@
 ##
 ################################################################################
 
+# THIS SCRIPT IS DEPRECATED since https://github.com/apache/incubator-wayang/pull/26
+
 if [ $# -eq 0 ]; then
 	>&2 echo "No parameters given."
 	echo "This script changes the Scala version used in this project."