Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Interoperability for JVM languages

Since none of the JDT team has replied, I'll just say a few words as
the original creator of the weaving approach.  The weaving approach
was never meant to be more than a hack and was to be replaced with
something more stable.  Unfortunately however, doing something more
stable has proven to be too difficult to do with limited resources.
We've been having conversations related to this over on the ide-dev
mailing list [1].  And your input would be appreciated.

[1] https://dev.eclipse.org/mailman/listinfo/ide-dev

On Mon, Nov 11, 2013 at 9:02 AM, Iulian Dragoș
<iulian.dragos@xxxxxxxxxxxx> wrote:
> Hi all,
>
> I'd like to get some advice on the best way to support JVM-based languages
> in Eclipse. I'm working on the Scala IDE for Eclipse, and while we have
> something working, I believe it's fragile and slow.
>
> I'll use Scala as an example, but any other JVM-language would do. The main
> goal is to support mixed Java/Scala projects. The Java editor should know
> about Scala compilation units, offer code completions based on Scala types,
> highlight errors, etc. Additionally, the Java builder should work when Java
> sources depend on Scala sources.
>
> One solution is to generate Java Elements based on Scala sources. Just as
> AspectJ tooling, we're using weaving to intercept calls and generate them
> based for Scala. However, it would be much cleaner if there was an extension
> point: we're not sure if we're intercepting all relevant calls, or if we're
> cutting in the "best" place. Additionally, we can't (or don't know how to)
> take advantage of laziness in the Java model, so we resolve all types
> up-front. This is slow, and the JDT sometimes blocks the UI thread waiting
> for these elements.
>
> The builder part is tricky as well: To support Java programs that depend on
> Scala types, the Scala compiler should run first. However, the Java builder
> does not always rebuild the relevant sources, so we need to trigger it
> (making non-API calls), essentially marking some Java compilation units as
> needing a rebuild.
>
> Given that JVM-based languages are getting more popular, it would be much
> better to have a clean way to interoperate. We'd like to help to push this
> further, if there's interest.
>
> I'm sure this isn't the first time this comes up, but I'd like to see what's
> your thinking (feasible? desirable?).
>
> thanks,
> iulian
>
>
>
> --
>
> --
> Iulian Dragos
>
> ------
> Reactive Apps on the JVM
> www.typesafe.com
>
> _______________________________________________
> jdt-core-dev mailing list
> jdt-core-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
>


Back to the top