-
Notifications
You must be signed in to change notification settings - Fork 14
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
Path-dependent types turn into type projections #57
Comments
Sorry, I should have pointed you to this Squid feature list from the start. There is expressly no support for path-dependent types in Squid. I am wondering why you need to embed type tags in the DSL code fragments, though. What is the use case? |
Oh, OK. We need this because most Flink/Spark methods require |
Ugh... that's a bit annoying. Note that lazy val universe: api.JavaUniverse = new runtime.JavaUniverse One workaround would be to define your own module universe as: object universe extends runtime.JavaUniverse ...though that would not help if you want to use definitions you can't change such as the Spark ones. EDIT: I'm wondering what kind of code it generates to actually create the type tags – code that would also need to be embedded. Is it some intricate stuff with local classes? Or do you remove these implicits as alluded in #55? |
I made a typo in the message above: class tags are not problematic; they embed well. For example: scala> import squid.TestDSL.Predef._
import squid.TestDSL.Predef._
scala> code"scala.reflect.classTag[String]"
res0: squid.TestDSL.ClosedCode[scala.reflect.ClassTag[String]] = code"scala.reflect.`package`.classTag[java.lang.String](scala.reflect.ClassTag.apply[java.lang.String](_root_.scala.Predef.classOf[String]))" |
I'm still struggling with getting
TypeTag
to work. Now the problem is that it is path-dependent on theuniverse
.Simplified example: Let's say that I have these types:
Then
prints
where
x.inner
turned intoOuter#Inner
.This is a problem in Emma, because after some code fragment runs through Squid, I'm getting errors such as
The text was updated successfully, but these errors were encountered: