You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/01/09 09:32:36 UTC

[1/3] git commit: Don't delegate to users `sbt`.

Updated Branches:
  refs/heads/master dceedb466 -> 73c724e12


Don't delegate to users `sbt`.

This changes our `sbt/sbt` script to not delegate to the user's `sbt`
even if it is present. If users already have sbt installed and they
want to use their own sbt, we'd expect them to just call sbt directly
from within Spark. We no longer set any enironment variables or anything
from this script, so they should just launch sbt directly on their own.

There are a number of hard-to-debug issues which can come from the
current appraoch. One is if the user is unaware of an existing sbt
installation and now without explanation their build breaks because
they haven't configured options correctly (such as permgen size)
within their sbt. Another is if the user has a much older version
of sbt hanging around, in which case some of the older versions
don't acutally work well when newer verisons of sbt are specified
in the build file (reported by @marmbrus). A third is if the user
has done some other modification to their sbt script, such as
setting it to delegate to sbt/sbt in Spark, and this causes
that to break (also reported by @marmbrus).

So to keep things simple let's just avoid this path and
remove it. Any user who already has sbt and wants to build
spark with it should be able to understand easily how to do it.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/4d2e388e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/4d2e388e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/4d2e388e

Branch: refs/heads/master
Commit: 4d2e388e6a2df3a8e24f63d7a61074ad8f8c9ee4
Parents: 04d83fc
Author: Patrick Wendell <pw...@gmail.com>
Authored: Wed Jan 8 23:56:53 2014 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Wed Jan 8 23:56:53 2014 -0800

----------------------------------------------------------------------
 sbt/sbt | 51 ++++++++++++++++++++-------------------------------
 1 file changed, 20 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/4d2e388e/sbt/sbt
----------------------------------------------------------------------
diff --git a/sbt/sbt b/sbt/sbt
index 7f47d90..98c86db 100755
--- a/sbt/sbt
+++ b/sbt/sbt
@@ -25,37 +25,26 @@ URL1=http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/s
 URL2=http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${SBT_VERSION}/sbt-launch.jar
 JAR=sbt/sbt-launch-${SBT_VERSION}.jar
 
-printf "Checking for system sbt ["
-if hash sbt 2>/dev/null; then 
-  printf "FOUND]\n"
-  # Use System SBT
-  sbt "$@"
-else
-  printf "NOT FOUND]\n"
-  # Download sbt or use already downloaded
-  if [ ! -d .sbtlib ]; then
-    mkdir .sbtlib
-  fi
-  if [ ! -f ${JAR} ]; then
-    # Download
-    printf "Attempting to fetch sbt\n"
-    if hash curl 2>/dev/null; then
-      curl --progress-bar ${URL1} > ${JAR} || curl --progress-bar ${URL2} > ${JAR}
-    elif hash wget 2>/dev/null; then
-      wget --progress=bar ${URL1} -O ${JAR} || wget --progress=bar ${URL2} -O ${JAR}
-    else
-      printf "You do not have curl or wget installed, please install sbt manually from http://www.scala-sbt.org/\n"
-      exit -1
-    fi
-  fi
-  if [ ! -f ${JAR} ]; then
-    # We failed to download
-    printf "Our attempt to download sbt locally to ${JAR} failed. Please install sbt manually from http://www.scala-sbt.org/\n"
+# Download sbt or use already downloaded
+if [ ! -f ${JAR} ]; then
+  # Download
+  printf "Attempting to fetch sbt\n"
+  if hash curl 2>/dev/null; then
+    curl --progress-bar ${URL1} > ${JAR} || curl --progress-bar ${URL2} > ${JAR}
+  elif hash wget 2>/dev/null; then
+    wget --progress=bar ${URL1} -O ${JAR} || wget --progress=bar ${URL2} -O ${JAR}
+  else
+    printf "You do not have curl or wget installed, please install sbt manually from http://www.scala-sbt.org/\n"
     exit -1
   fi
-  printf "Launching sbt from ${JAR}\n"
-  java \
-    -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \
-    -jar ${JAR} \
-    "$@"
 fi
+if [ ! -f ${JAR} ]; then
+  # We failed to download
+  printf "Our attempt to download sbt locally to ${JAR} failed. Please install sbt manually from http://www.scala-sbt.org/\n"
+  exit -1
+fi
+printf "Launching sbt from ${JAR}\n"
+java \
+  -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \
+  -jar ${JAR} \
+  "$@"


[3/3] git commit: Merge pull request #368 from pwendell/sbt-fix

Posted by rx...@apache.org.
Merge pull request #368 from pwendell/sbt-fix

Don't delegate to users `sbt`.

This changes our `sbt/sbt` script to not delegate to the user's `sbt`
even if it is present. If users already have sbt installed and they
want to use their own sbt, we'd expect them to just call sbt directly
from within Spark. We no longer set any enironment variables or anything
from this script, so they should just launch sbt directly on their own.

There are a number of hard-to-debug issues which can come from the
current appraoch. One is if the user is unaware of an existing sbt
installation and now without explanation their build breaks because
they haven't configured options correctly (such as permgen size)
within their sbt (reported by @patmcdonough). Another is if the user has a much older version
of sbt hanging around, in which case some of the older versions
don't acutally work well when newer verisons of sbt are specified
in the build file (reported by @marmbrus). A third is if the user
has done some other modification to their sbt script, such as
setting it to delegate to sbt/sbt in Spark, and this causes
that to break (also reported by @marmbrus).

So to keep things simple let's just avoid this path and
remove it. Any user who already has sbt and wants to build
spark with it should be able to understand easily how to do it.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/73c724e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/73c724e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/73c724e1

Branch: refs/heads/master
Commit: 73c724e1237db383737a9d37c1c8d697064ec28e
Parents: dceedb4 49cbf48
Author: Reynold Xin <rx...@apache.org>
Authored: Thu Jan 9 00:32:19 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Thu Jan 9 00:32:19 2014 -0800

----------------------------------------------------------------------
 sbt/sbt | 51 ++++++++++++++++++++-------------------------------
 1 file changed, 20 insertions(+), 31 deletions(-)
----------------------------------------------------------------------



[2/3] git commit: Small typo fix

Posted by rx...@apache.org.
Small typo fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/49cbf48b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/49cbf48b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/49cbf48b

Branch: refs/heads/master
Commit: 49cbf48bcc4a3866984c8370da1917dd1c142115
Parents: 4d2e388
Author: Patrick Wendell <pw...@gmail.com>
Authored: Thu Jan 9 00:12:34 2014 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Thu Jan 9 00:12:34 2014 -0800

----------------------------------------------------------------------
 sbt/sbt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/49cbf48b/sbt/sbt
----------------------------------------------------------------------
diff --git a/sbt/sbt b/sbt/sbt
index 98c86db..62ead8a 100755
--- a/sbt/sbt
+++ b/sbt/sbt
@@ -25,7 +25,7 @@ URL1=http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/s
 URL2=http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${SBT_VERSION}/sbt-launch.jar
 JAR=sbt/sbt-launch-${SBT_VERSION}.jar
 
-# Download sbt or use already downloaded
+# Download sbt launch jar if it hasn't been downloaded yet
 if [ ! -f ${JAR} ]; then
   # Download
   printf "Attempting to fetch sbt\n"