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

Scala IDE errors

9 replies
John Ky
Joined: 2009-10-06,
User offline. Last seen 42 years 45 weeks ago.
Hi all,

I just installed the Scala Eclipse IDE 2.7.6.final, on Eclipse 3.5.0, and I get the errors shown in the attached JPEG image.

I'm only just starting to learn Scala, but it seems everything I type is an error.

Does anyone know what is going on and can lend a hand?

Cheers,

-John

Carsten Saager
Joined: 2008-12-19,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala IDE errors
Looks to me that JDT-weaving is disabled (check in the preferences). 
-Carsten

On Tue, Oct 6, 2009 at 7:04 AM, John Ky <newhoggy@gmail.com> wrote:
Hi all,

I just installed the Scala Eclipse IDE 2.7.6.final, on Eclipse 3.5.0, and I get the errors shown in the attached JPEG image.

I'm only just starting to learn Scala, but it seems everything I type is an error.

Does anyone know what is going on and can lend a hand?

Cheers,

-John


milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Scala IDE errors

On Tue, Oct 6, 2009 at 6:04 AM, John Ky wrote:
> I just installed the Scala Eclipse IDE 2.7.6.final, on Eclipse 3.5.0, and I
> get the errors shown in the attached JPEG image.
>
> I'm only just starting to learn Scala, but it seems everything I type is an
> error.
>
> Does anyone know what is going on and can lend a hand?

As Carsten said, from that screenshot it's most likely that JDT
Weaving is disabled.

Have you followed the troubleshooting instructions here?

http://www.scala-lang.org/node/94

Cheers,

Miles

John Ky
Joined: 2009-10-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala IDE errors
Hi Miles, Carston,

Thanks for the help.

I downloaded and installed a fresh Eclipse 3.5.1 and installed Scala and it worked right up.  The version of Eclipse I was using before was 3.5.0 and also had the Groovy, Clojure, and Subclips plugins.

I don't know what the cause was, as so many variables are different.  Perhaps Eclipse was lying about the JDT Weaving - or the multiple language plugins don't play nice with each other?

Cheers,

-John

On Tue, Oct 6, 2009 at 7:30 PM, Miles Sabin <miles@milessabin.com> wrote:
On Tue, Oct 6, 2009 at 6:04 AM, John Ky <newhoggy@gmail.com> wrote:
> I just installed the Scala Eclipse IDE 2.7.6.final, on Eclipse 3.5.0, and I
> get the errors shown in the attached JPEG image.
>
> I'm only just starting to learn Scala, but it seems everything I type is an
> error.
>
> Does anyone know what is going on and can lend a hand?

As Carsten said, from that screenshot it's most likely that JDT
Weaving is disabled.

Have you followed the troubleshooting instructions here?

 http://www.scala-lang.org/node/94

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Scala IDE errors

On Tue, Oct 6, 2009 at 10:44 AM, John Ky wrote:
> I don't know what the cause was, as so many variables are different.
> Perhaps Eclipse was lying about the JDT Weaving - or the multiple language
> plugins don't play nice with each other?

It might well have been a conflict with the Groovy plugin ... Andy
Clement and I are working on getting the Scala and Groovy tooling to
play nicely together.

Cheers,

Miles

phkoester
Joined: 2009-08-23,
User offline. Last seen 42 years 45 weeks ago.
Debugging/Patching AspectJ Weaver

Hi out there,

I noticed there is a new AspectJ weaver available, as of version 1.6.6.

Alas, my problem with Scala and load-time weaving persists with this new
version.

So I eventually decided to give it a try and build/patch the weaver on
my own. If it's really only that `$$' stuff in the Scala-class names I
should be able to track down the problem and propose a patch.

But where to obtain the sources? Where is the weaver's SCM repository? I
tried the CVS repo `:pserver:anonymous@dev.eclipse.org:/cvsroot/tools',
but it doesn't look like it contains what I want.

So if anybody can point me to the right CVS/SVN address it would be a
great help for me.

The Eclipse SVN repo I was aware of, `http://dev.eclipse.org/svnroot',
seems to have vanished altogether.

Regards
---Phil

John Ky
Joined: 2009-10-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala IDE errors
Hi Miles,

I just installed Groovy and Clojure after having installed Scala and everything is working fine.  I have a feeling the installation order matters.

Anyway, I'm happy it all works now.

Cheers,

-John

On Tue, Oct 6, 2009 at 8:58 PM, Miles Sabin <miles@milessabin.com> wrote:
On Tue, Oct 6, 2009 at 10:44 AM, John Ky <newhoggy@gmail.com> wrote:
> I don't know what the cause was, as so many variables are different.
> Perhaps Eclipse was lying about the JDT Weaving - or the multiple language
> plugins don't play nice with each other?

It might well have been a conflict with the Groovy plugin ... Andy
Clement and I are working on getting the Scala and Groovy tooling to
play nicely together.

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

Linas
Joined: 2009-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Debugging/Patching AspectJ Weaver

Try the repository specified in
http://www.eclipse.org/aspectj/doc/released/faq.php#q:buildingsource

Linas.

On Tue, 2009-10-06 at 23:48 +0200, Philip Köster wrote:
> Hi out there,
>
> I noticed there is a new AspectJ weaver available, as of version 1.6.6.
>
> Alas, my problem with Scala and load-time weaving persists with this new
> version.
>
> So I eventually decided to give it a try and build/patch the weaver on
> my own. If it's really only that `$$' stuff in the Scala-class names I
> should be able to track down the problem and propose a patch.
>
> But where to obtain the sources? Where is the weaver's SCM repository? I
> tried the CVS repo `:pserver:anonymous@dev.eclipse.org:/cvsroot/tools',
> but it doesn't look like it contains what I want.
>
> So if anybody can point me to the right CVS/SVN address it would be a
> great help for me.
>
> The Eclipse SVN repo I was aware of, `http://dev.eclipse.org/svnroot',
> seems to have vanished altogether.
>
> Regards
> ---Phil

phkoester
Joined: 2009-08-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Debugging/Patching AspectJ Weaver

For those that might be interested: I found that adding four lines to
`BcelObjectType.getOuterClass' seems to fix the Scala issues with the
weaver (lines 2 through 5):

1 String superClassName = className.substring(0, lastDollar);
2 final String anon = "$$anon"; // Scala
3 if (superClassName.endsWith(anon)) {
4 superClassName = superClassName.substring(0, superClassName.length()
- anon.length());
5 }
6 UnresolvedType outer = UnresolvedType.forName(superClassName);

Now things seem to work perfectly for me, but I'll have to do some more
testing ...

Cheers
---Phil

John Ky
Joined: 2009-10-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala IDE errors
Hi Miles,

No, it's definitely Groovy.  Just sometimes it just looks like Scala is okay, but not really.

Thanks for the clarification.

Cheers,

-John

On Wed, Oct 7, 2009 at 11:23 AM, John Ky <newhoggy@gmail.com> wrote:
Hi Miles,

I just installed Groovy and Clojure after having installed Scala and everything is working fine.  I have a feeling the installation order matters.

Anyway, I'm happy it all works now.

Cheers,

-John

On Tue, Oct 6, 2009 at 8:58 PM, Miles Sabin <miles@milessabin.com> wrote:
On Tue, Oct 6, 2009 at 10:44 AM, John Ky <newhoggy@gmail.com> wrote:
> I don't know what the cause was, as so many variables are different.
> Perhaps Eclipse was lying about the JDT Weaving - or the multiple language
> plugins don't play nice with each other?

It might well have been a conflict with the Groovy plugin ... Andy
Clement and I are working on getting the Scala and Groovy tooling to
play nicely together.

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin


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