This page is no longer maintained — Please continue to the home page at www.scala-lang.org

[Eclipse] awkward errors when I clean project for mixed java/scala

2 replies
Caoilte
Joined: 2010-01-04,
User offline. Last seen 47 weeks 2 days ago.

Hi,
I'm just starting out and I'm trying to use scala and java together in
eclipse (latest 3.5 and latest stable Scala IDE).

I've come up across a number of intermittent problems with the tooling
(most of which seem to spam __magic_sauce__ across the screen until
after a platform restart) but the only one I can reliably reproduce at
the moment occurs after I have cleaned the project (ie requested a
full rebuild) when there are scala errors.

What seems to be happening is that because there are errors in the
scala code the scala "builder" does not compile the java files.
Consequently everywhere in my scala code which uses the java files in
the project I then get errors and where before I might have had one
genuine scala error I now have dozens of spurious errors from java
compiled class files are missing.

Is this a known bug / fixed? Is there a bug number I can
watch/votefor? Are there any good workarounds people have settled
upon?

Regards,

Caoilte O'Connor

Caoilte
Joined: 2010-01-04,
User offline. Last seen 47 weeks 2 days ago.
Re: [Eclipse] awkward errors when I clean project for mixed jav

Hi,
Most of the other bugs I was experiencing went away when I upgraded to
the latest nightly build (which is significantly more
feature-impressive than the last release). One bug that seems to be
fixed involves major issues with the .classpath where the released
version of the plugin gets confused if the output and src elements are
set to different directories.

Is there any timeline anywhere of when the next release will be, as I
am uncomfortable recommending to my team that we use a nightly?

Incidentally, the bug/"missing feature" I mentioned in my previous
email remains. I can see why it might be a "won't fix" but I do want
to add that when I was first starting out it was very confusing trying
to diagnose why imports sometimes worked and sometimes didn't. It's
quite counter-intuitive to need scala code to compile fully before
java parts of that code don't have errors. I would happily raise a
ticket for this if it seems like a valid bug/"missing feature"

Great work on what now seems like a great plugin,

Caoilte

On Mon, Jan 4, 2010 at 1:03 AM, Caoilte O'Connor wrote:
> Hi,
> I'm just starting out and I'm trying to use scala and java together in
> eclipse (latest 3.5 and latest stable Scala IDE).
>
> I've come up across a number of intermittent problems with the tooling
> (most of which seem to spam __magic_sauce__ across the screen until
> after a platform restart) but the only one I can reliably reproduce at
> the moment occurs after I have cleaned the project (ie requested a
> full rebuild) when there are scala errors.
>
> What seems to be happening is that because there are errors in the
> scala code the scala "builder" does not compile the java files.
> Consequently everywhere in my scala code which uses the java files in
> the project I then get errors and where before I might have had one
> genuine scala error I now have dozens of spurious errors from java
> compiled class files are missing.
>
> Is this a known bug / fixed? Is there a bug number I can
> watch/votefor? Are there any good workarounds people have settled
> upon?
>
>
> Regards,
>
> Caoilte O'Connor
>

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Re: [Eclipse] awkward errors when I clean project for mixe

On Tue, Jan 5, 2010 at 4:41 PM, Caoilte O'Connor wrote:
> Most of the other bugs I was experiencing went away when I upgraded to
> the latest nightly build (which is significantly more
> feature-impressive than the last release). One bug that seems to be
> fixed involves major issues with the .classpath where the released
> version of the plugin gets confused if the output and src elements are
> set to different directories.

Correct ... this has never been supported for 2.7.x releases and
earlier, but is now on trunk.

> Is there any timeline anywhere of when the next release will be, as I
> am uncomfortable recommending to my team that we use a nightly?

The next IDE release will coincide with the next release of the Scala
command line tools, ie. 2.8.

> Incidentally, the bug/"missing feature" I mentioned in my previous
> email remains. I can see why it might be a "won't fix" but I do want
> to add that when I was first starting out it was very confusing trying
> to diagnose why imports sometimes worked and sometimes didn't. It's
> quite counter-intuitive to need scala code to compile fully before
> java parts of that code don't have errors. I would happily raise a
> ticket for this if it seems like a valid bug/"missing feature"

It's a tricky one: solving this properly requires deeper cooperation
between the Scala and Java compilers than is present at the moment.
IMO the best line of attack is a more general one which addresses the
joint-compilation problem for all JVM languages that want to play ...
there's been some discussion of this on the JVM languages list
recently,

http://groups.google.com/group/jvm-languages/browse_thread/thread/4f20c8...

> Great work on what now seems like a great plugin,

Thanks :-)

Cheers,

Miles

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland