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

M4/2.10 quasiquotes fail at runtime #22

Closed
stanch opened this issue Mar 23, 2014 · 17 comments
Closed

M4/2.10 quasiquotes fail at runtime #22

stanch opened this issue Mar 23, 2014 · 17 comments
Labels
Milestone

Comments

@stanch
Copy link
Contributor

stanch commented Mar 23, 2014

Just to track this:

exception during macro expansion: 
[error] java.lang.ClassNotFoundException: scala.reflect.api.Universe$Liftable
@stanch stanch changed the title M4 quasiquotes fail at runtime M4/2.10 quasiquotes fail at runtime Mar 23, 2014
@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

Fixed in 46cd0f9, will soon be deployed in 2.0.0-M5.

@xeno-by xeno-by closed this as completed Mar 23, 2014
@xeno-by xeno-by added this to the 2.0.0-final milestone Mar 23, 2014
@stanch
Copy link
Contributor Author

stanch commented Mar 23, 2014

Updated, now getting

exception during macro expansion: 
[error] java.lang.UnsupportedClassVersionError: scala/reflect/api/Universe$Liftable : Unsupported major.minor version 51.0

Maybe this is something on my side? The code is here: https://github.com/stanch/scalatags-md. Happens when you run sbt test.

@stanch
Copy link
Contributor Author

stanch commented Mar 23, 2014

It's fascinating how many facets fail can have! This one is caused by Java-compiled portions of quasiquotes.jar being compiled with Java 7 :)

Would it be possible for you to use Java 7 or 8? I'd prefer to cool down the pace of releases if that's not an absolute blocker for you. Alternatively I could publish a snapshot build with Java 6.

A snapshot would be very nice :) There is a benefit for you as well in that I would (or wouldn’t) confirm that there are no more hidden surprises left :)

@stanch
Copy link
Contributor Author

stanch commented Mar 23, 2014

Just FYI, http://scalamacros.org/news/2014/03/23/macro-paradise-2.0.0-M4.html does not display the layout for some reason...

@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

Thanks, fixed the layout and published 2.0.0-SNAPSHOT against all supported branches.

@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

If everything ends up working for you, I will publish 2.0.0-M6 one of these days.

@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

Also, thanks a lot for testing things out!

@stanch
Copy link
Contributor Author

stanch commented Mar 23, 2014

You are welcome! But...

exception during macro expansion: 
[error] java.lang.NoSuchMethodError: scala.quasiquotes.StandardLiftables.Liftable()Lscala/quasiquotes/StandardLiftables$Liftable$;
[error]     at scala.quasiquotes.StandardLiftables$class.liftList(StandardLiftables.scala:54)
[...]

:D

@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

That's a different error, which makes me kind of happy :)

How do I reproduce it?

@stanch
Copy link
Contributor Author

stanch commented Mar 23, 2014

You can clone https://github.com/stanch/scalatags-md and run sbt test. I’m on Java 6, as you already know. Old snapshots in Ivy cache cleaned.

@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

Okay, thanks! These days I will be very occupied by EPFL stuff, but I'll do my best to take a look.

@stanch
Copy link
Contributor Author

stanch commented Mar 23, 2014

Thanks! I will not really need this until next week, when I’m going to prepare Macroid 2.0 documentation.
Perhaps the issue should be reopened?

@xeno-by xeno-by reopened this Mar 23, 2014
@holograph
Copy link

Another reproduction scenario: https://github.com/wix/accord/tree/paradise-2.0.x

@xeno-by
Copy link
Member

xeno-by commented Mar 23, 2014

Minimal reproduction:

import scala.reflect.macros.Context
import scala.language.experimental.macros
import scala.quasiquotes.StandardLiftables

class Helper[C <: Context](val c: C) extends StandardLiftables {
  import c.universe._
  val u: c.universe.type = c.universe

  val tpe = typeOf[Int]
  def bar = q"2: $tpe"
}

object Macros {
  def impl(c: Context) = {
    val helper = new Helper[c.type](c)
    c.Expr[Int](helper.bar)
  }

  def foo: Int = macro impl
}
object Test extends App {
  Macros.foo
}

@xeno-by
Copy link
Member

xeno-by commented Mar 24, 2014

Allright nailed it: 7dfce72. Could you guys redownload the snapshot and try again?

@xeno-by xeno-by closed this as completed Mar 24, 2014
@stanch
Copy link
Contributor Author

stanch commented Mar 24, 2014

Confirmed, thanks a lot!

xeno-by added a commit to xeno-by/accord that referenced this issue Mar 30, 2014
@holograph
Copy link

M6 confirmed to work, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants