Commit 36191a4
committed
root cause - empty line execution
Root Cause Analysis: Livy Scala 2.13 Statement Execution Failure
Prophecy's Scala init code (DetectSparkProvider) contains blank lines (\n\n) between statements — e.g., between the closing } of the object definition and the DetectSparkProvider.detectSparkProvider() call. Livy's AbstractSparkInterpreter.executeLines() splits submitted code by \n and interprets each line individually via IMain.interpret(). When it encounters an empty line (""), the Scala 2.13 REPL (rewritten with JLine 3 in scala/scala#8036) returns Results.Error for the empty input, whereas the Scala 2.12 REPL silently accepted it. This caused executeLines to immediately return ExecuteError("Error", "", []) — the exact empty-error response observed. Manual curl tests passed because they used single \n (no blank lines). The fix skips blank/empty lines in executeLine(), treating them as no-ops, consistent with standard REPL :paste mode semantics.1 parent df978da commit 36191a4
1 file changed
Lines changed: 3 additions & 1 deletion
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
0 commit comments