scala-js-fiddle
scala-js-fiddle copied to clipboard
Compiling code with macros results in error
Compiling the last two examples from the homepage of http://scala-js-fiddle.com results in an error:
Main.scala:62: error: macro implementation not found: async
(the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
async{
^
and
Main.scala:293: error: macro implementation not found: foreach
(the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
for (x <- 0 until canvas.width optimized){
^
Do you declare the right dependencies to the libraries providing these macros? What does your libraryDependencies look like? For the async stuff it should contain something like this:
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.2" % "provided"
This should work just fine out of the box.
If it doesn't, please provide a link to a branch in a GitHub repo exhibiting the error. Or at least the content of your build.sbt and Main.scala.
Looks like this happened after my move from ec2 to heroku. I bet the classloading used to make macros doesn't work on their filesystem layout or something.
On Tue, Jan 20, 2015 at 4:02 PM, Sébastien Doeraene < [email protected]> wrote:
Do you declare the right dependencies to the libraries providing these macros? What does your libraryDependencies look like? For the async stuff it should contain something like this:
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.2" % "provided"
This should work just fine out of the box.
If it doesn't, please provide a link to a branch in a GitHub repo exhibiting the error. Or at least the content of your build.sbt and Main.scala.
— Reply to this email directly or view it on GitHub https://github.com/lihaoyi/scala-js-fiddle/issues/10#issuecomment-70760195 .
I'm not running the server locally, the error is occurring on the hosted server. For example, http://www.scala-js-fiddle.com/gist/9443f8e0ecc68d1058ad/RayTracer.scala does not compile.
Yeah I saw that. It's hosted on heroku now, after I moved it from EC2, and I suspect that move is the cause of the problem
On Tue, Jan 20, 2015 at 5:17 PM, Shadaj [email protected] wrote:
I'm not running the server locally, the error is occurring on the hosted server. For example, http://www.scala-js-fiddle.com/gist/9443f8e0ecc68d1058ad/RayTracer.scala does not compile.
— Reply to this email directly or view it on GitHub https://github.com/lihaoyi/scala-js-fiddle/issues/10#issuecomment-70767898 .