2011/5/24 Eric Ayers <zun...@google.com>:
> Hi Grzegorz,
>
> You mentioned the compiled classes in the class path are used to
> populate the type orace.  For the most part, the type oracle types are
> compiled from source.  Types that don't have source are then checked
> to see if they are binary annotations and then a type oracle reference
> is entered.

I have addNewTypes method in mind:
http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java&l=380

It reads class file data and uses it to populate TypeOracle, right?

> Could it be true that scala-library.jar contains both libraries to use
> with the GWT compiler and some sort of runtime environment (sources)
> to compile with your app?  If so, maybe the solution is to split
> scala-library.jar into the equivalent of 'dev' and 'user' components,
> such that 'user' is not needed for running the compiler and 'dev' is
> not needed for the app to link against.

I think the answer is no. Let me explain the issue a little bit more.
The scala-library.jar contains the whole scala runtime library
including things like scala collections, etc. Those classes are used
by gwtc itself to handle jribble input (alternative to java input).

Now, application written in Scala is going to use the same classes
(e.g. collections) but of different version. Thus we need two versions
of .class files on the classpath: one (call it A) used by gwtc
implementation and one (call it B) used for application itself. We
need B version of .class files on a classpath because JDT needs those
classes in order to properly resolve references to Scala code
(application code) from Java code. We also need B in order to populate
TypeOracle in addNewTypes method.

Does this explain the issue a bit better now?

-- 
Grzegorz Kossakowski

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to