Skip to content
Snippets Groups Projects
Commit 90f92420 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Another fix ported forward for the REPL

parent 3854d23d
No related branches found
No related tags found
No related merge requests found
...@@ -1087,7 +1087,7 @@ object SparkIMain { ...@@ -1087,7 +1087,7 @@ object SparkIMain {
// $line3.$read.$iw.$iw.Bippy = // $line3.$read.$iw.$iw.Bippy =
// $line3.$read$$iw$$iw$Bippy@4a6a00ca // $line3.$read$$iw$$iw$Bippy@4a6a00ca
private def removeLineWrapper(s: String) = s.replaceAll("""\$line\d+[./]\$(read|eval|print)[$.]""", "") private def removeLineWrapper(s: String) = s.replaceAll("""\$line\d+[./]\$(read|eval|print)[$.]""", "")
private def removeIWPackages(s: String) = s.replaceAll("""\$(iw|read|eval|print)[$.]""", "") private def removeIWPackages(s: String) = s.replaceAll("""\$(iw|iwC|read|eval|print)[$.]""", "")
private def removeSparkVals(s: String) = s.replaceAll("""\$VAL[0-9]+[$.]""", "") private def removeSparkVals(s: String) = s.replaceAll("""\$VAL[0-9]+[$.]""", "")
def stripString(s: String) = removeSparkVals(removeIWPackages(removeLineWrapper(s))) def stripString(s: String) = removeSparkVals(removeIWPackages(removeLineWrapper(s)))
......
...@@ -175,7 +175,13 @@ trait SparkImports { ...@@ -175,7 +175,13 @@ trait SparkImports {
// handle quoting keywords separately. // handle quoting keywords separately.
case x => case x =>
for (imv <- x.definedNames) { for (imv <- x.definedNames) {
if (currentImps contains imv) addWrapper() // MATEI: Changed this check because it was messing up for case classes
// (trying to import them twice within the same wrapper), but that is more likely
// due to a miscomputation of names that makes the code think they're unique.
// Need to evaluate whether having so many wrappers is a bad thing.
/*if (currentImps contains imv)*/
val imvName = imv.toString
if (currentImps exists (_.toString == imvName)) addWrapper()
val objName = req.lineRep.readPath val objName = req.lineRep.readPath
val valName = "$VAL" + newValId(); val valName = "$VAL" + newValId();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment