Comments (10)
The Scala interpreter is returning http://www.scala-lang.org/files/archive/nightly/2.12.x/api/2.12.x/scala-compiler/scala/tools/nsc/interpreter/Results$$Incomplete$.html for a comment-only input. It returns the same thing for a cell with code x = {
.
from spylon-kernel.
Wonder if we can use pygments for this?
from spylon-kernel.
Wonder if we can use pygments for this?
Aren't you on vacation? 😀
from spylon-kernel.
Toree marks all cases of incomplete as a syntax error (https://github.com/apache/incubator-toree/blob/87a9eb8ad08406ce0747e92f7714d4eb54153293/kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/interpreter/tasks/ExecuteRequestTaskActor.scala#L95).
Either we go with that or we start having heuristics for special cases like "all of the lines in the cell are comments."
from spylon-kernel.
Is that the cause of Toree raising sytnax errors when the last line in a cell is a comment?
from spylon-kernel.
Certainly happens when the comment is the only thing in the cell. I don't know if it's the same spot in the code that logs the syntax error for a cell that has some code and a comment on the last line in Toree. (That oddity doesn't happen in spylon-kernel).
I'm leaning toward simply treating Results.Incomplete
as an error (with output, not the silence it currently logs) and not inventing special parsing logic for the cell-with-comments-only case.
from spylon-kernel.
So Toree executes line by line. This is basically the exact same problem.
from spylon-kernel.
We can probably parse a scala code block with pygments and determine if it's all "blank".
from spylon-kernel.
Whatever causes this behavior (empty results returned by code-only cell) also worsens #26. If you run a cell with nothing but comments, all future print behaviors are disabled.
from spylon-kernel.
The withOut block wrapping that probably needs to be done per call to interpret to fix #26 will also implicitly fix this.
from spylon-kernel.
Related Issues (20)
- ExecutorClassLoader error in Spylon notebook
- How add additional jar files to SparkContext HOT 5
- [Request] provide example of Spark Yarn cluster conectivity (EMR) HOT 1
- Write NULL File to HDFS
- Graph Frames modules are missing
- Not able of import external packages HOT 6
- Question: How to gracefully stop execution in a cell?
- Does spylon-kernel support Spark 3.0? HOT 2
- spylon-kernel error : compilation: disabled (not enough contiguous free space left) HOT 1
- Unable to install spylon kernel HOT 2
- spylon launcher.packages inside kernel.json args
- s3 filesystem not found
- [BUG]: Spark submit fails: No such file or directory: '/opt/spark/python/pyspark/./bin/spark-submit'
- Cannot get Hive data HOT 1
- Run Scala cell on Jupyter notebook
- Cannot install spylon-kernel on Ubuntu 22 HOT 1
- Failed running `python -m spylon_kernel install`
- Unable to use existing spark server with spylon-kernel
- Using spylon-kernel with java?
- Outdated versioneer.py broken for Python 3.12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spylon-kernel.