Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSP #match directives with appear broken #580

Open
nrinaudo opened this issue May 22, 2023 · 0 comments
Open

SSP #match directives with appear broken #580

nrinaudo opened this issue May 22, 2023 · 0 comments

Comments

@nrinaudo
Copy link

Describe the bug
Trying to run a very basic pattern match, I get a multi-screens long error message.

To Reproduce
Have the following template:

<%
  var customer = ("Gold", 1)
%>

#match(customer._1)
#case("Gold") Great stuff
#otherwise Bad stuff
#end

This is being executed with the following code:

import org.fusesource.scalate.TemplateEngine

object Run extends App {
  val sourceDataPath = new java.io.File("./src/main/resources/sample.ssp").getCanonicalPath
  val engine         = new TemplateEngine

  val result = engine.layout(sourceDataPath)
  println(result)
}

Expected behavior
I would expect to see the Great stuff string printed.
I'm seeing a massive error message instead, whose salient point appears to be:

[error] org.fusesource.scalate.TemplateException: assertion failed: 
[error]   No RuntimeVisibleAnnotations in classfile with ScalaSignature attribute: package object util
[error]      while compiling: /tmp/scalate-8794168128220690575-workdir/src/home/nrinaudo/dev/jpm/templates/src/main/resources/sample.ssp.scala
[error]         during phase: globalPhase=patmat, enteringPhase=parser
[error]      library version: version 2.12.16
[error]     compiler version: version 2.12.16

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser N/A
  • Version 1.9.8 (assuming this is the scalate version we're talking about)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant