diff options
Diffstat (limited to 'repl')
-rw-r--r-- | repl/src/main/scala/spark/repl/SparkIMain.scala | 2 | ||||
-rw-r--r-- | repl/src/main/scala/spark/repl/SparkImports.scala | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/repl/src/main/scala/spark/repl/SparkIMain.scala b/repl/src/main/scala/spark/repl/SparkIMain.scala index 14e6eb3455..fb4b9f9b40 100644 --- a/repl/src/main/scala/spark/repl/SparkIMain.scala +++ b/repl/src/main/scala/spark/repl/SparkIMain.scala @@ -1087,7 +1087,7 @@ object SparkIMain { // $line3.$read.$iw.$iw.Bippy = // $line3.$read$$iw$$iw$Bippy@4a6a00ca 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]+[$.]""", "") def stripString(s: String) = removeSparkVals(removeIWPackages(removeLineWrapper(s))) diff --git a/repl/src/main/scala/spark/repl/SparkImports.scala b/repl/src/main/scala/spark/repl/SparkImports.scala index 6ccd3cf1f0..5caf5ca51a 100644 --- a/repl/src/main/scala/spark/repl/SparkImports.scala +++ b/repl/src/main/scala/spark/repl/SparkImports.scala @@ -175,7 +175,13 @@ trait SparkImports { // handle quoting keywords separately. case x => 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 valName = "$VAL" + newValId(); |