scalasbtscalatrascalatessp

How to interpret SBT error messages


Doing some work in scalatra, and when running ./sbt, I'm seeing this error message:

[trace] Stack trace suppressed: run last compile:sources for the full output.
[error] (compile:sources) org.fusesource.scalate.InvalidSyntaxException: `val' expected but `s' found at 1.12
[error] Total time: 0 s, completed Jul 1, 2013 6:04:31 PM

Can anyone give some insight into what 1.12 refers to? I'm running a pretty basic Scalatra framework, slightly modified (one .ssp file added, one .scala filed edited) from the hello-scala standard that downloads with g8


Solution

  • InvalidSyntaxException is thrown because your ssp is incorrect, it has the wrong syntax.

    1.12 means exactly as Daniel says: line 1, column 12 of the template file. Scalate (the templating engine) takes your ssp files and translates them into Scala, which it then compiles. As sbt advises, run

    last compile:sources
    

    and this will give you more information. Scalate isn't very helpful about the files it is parsing, but this will probably be the ssp you added. It gives you the name of the file when it can't compile the resulting Scala file, but doesn't when it can't parse the ssp. This is really an issue that should be raised in the Scalate Assembla space.