You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Chip Senkbeil (JIRA)" <ji...@apache.org> on 2016/05/10 17:25:13 UTC

[jira] [Commented] (TOREE-311) commentation causes abiguos error

    [ https://issues.apache.org/jira/browse/TOREE-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278508#comment-15278508 ] 

Chip Senkbeil commented on TOREE-311:
-------------------------------------

Despite the error, is the variable you are declaring available in subsequent cells?

There is an known (not documented) issue with comments. We break up code cells and evaluate each line of code on its own. Blocks of code get grouped together (including method declarations, etc).

E.g.
{code}
val x = 3
val z = {
  val y = 4
  x + y
}
println(x + z)
{code}

results in the following being evaluated
{code}val x = 3{code}
{code}
val z = {
  val y = 4
  x + y
}
{code}
{code}println(x + z){code}

So, if you have a comment on its own line, it gets an individual evaluation. As we try to compile and execute each line, the compiler does not like empty or comment-only code. We have a check for empty code (and ignore it), but we don't filter out code that is purely comments.

Ideally, we should have some sort of filter to remove comments when compiling and executing.


> commentation causes abiguos error
> ---------------------------------
>
>                 Key: TOREE-311
>                 URL: https://issues.apache.org/jira/browse/TOREE-311
>             Project: TOREE
>          Issue Type: Bug
>         Environment: Ubuntu/Spark 1.6.0
>            Reporter: Marshall Markham
>         Attachments: comment_mayhem.JPG
>
>
> Adding a double forward slash comment as the last line of a cell causes an error with no message or stack trace. See attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)