Have you looked at https://code.google.com/p/scalascriptengine/ ?
It takes care of compiler interactions for you, it may do the right thing class loader wise.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
AFAIK, the compiler is not using class loaders to look up classes needed for compilation. Instead, it scans the classpath by itself and manually unpickles classfiles.
I don't know if there is a way to force standard compiler (scala.tools.nsc.Global) to see some additional classes from classloaders. However, there is a separate incarnation of the compiler that uses reflection instead of manually scanning classpath. It is scala.tools.reflect.ReflectGlobal. However, be aware that this version of the compiler shares some serious bugs with Scala runtime reflection. See https://groups.google.com/forum/#!topic/scala-user/tLz-B7d0I80
What information does Global need apart from what's available via Java reflection?
That's correct, it does not. Is there anything else that comes in mind? Given that we fix this problem with ReflectGlobal, would that give us feature parity with Global or there would be something else to fix?
We could special-case ReflectGlobal to treat enumerable classloaders specially. That seems feasible and useful.
--
Grzegorz KossakowskiScalac hacker at Typesafetwitter: @gkossakowskigithub: @gkossakowski
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.