- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Which IDE works ATM for Scala 2.8?
Sat, 2009-07-18, 21:27
hi,
i urgently need to work on a Scala 2.8 project (i guess it was a
mistake to start using 2.8, since despite middle of july there are no
signs of the promised preview, but now everything is full of default
and named args, so no way back.....). the eclipse plug-in ist still
hopelessly broken and a PITA. anyone knows if it's possible to work
with idea or netbeans on an 2.8 project?
thanks, -sciss-
Sat, 2009-07-18, 22:07
#2
Re: Which IDE works ATM for Scala 2.8?
after opening java perspective, then again scala perspective, it
launches again. don't know what was the reason.... ;o/ i hope this
stays a little stable...
Am 18.07.2009 um 22:52 schrieb Sciss:
> in the meantime, a very urgent request for help: at this moment,
> all i get when launching my application is
>
> Exception in thread "main" java.lang.NoSuchMethodError: main
>
> this also happens from the terminal, using
>
> $ java -cp bin:lib2/scala-library.jar de.sciss.tint.nuages.Nuages
>
> the main class _is there_ (e.g. bin/de/sciss/tint/nuages/
> Nuages.class exists) , so this got compiled:
>
> package de.sciss.tint.nuages
>
> import _root_.de.sciss.tint.sc.{ Server, ServerOptions }
> import _root_.java.awt.{ EventQueue }
> import _root_.java.awt.event.{ WindowAdapter, WindowEvent }
> import _root_.javax.swing.{ JFrame, WindowConstants }
>
> object Nuages {
> def main( args : Array[ String ]) {
> EventQueue.invokeLater( new Runnable { def run = new Nuages })
> }
> }
>
> class Nuages { .... }
>
>
> so don't understand the problem. fifteen minutes ago it was launching.
>
> hell.........
>
> thanks, -sciss-
>
>
>
> Am 18.07.2009 um 22:27 schrieb Sciss:
>
>> hi,
>>
>> i urgently need to work on a Scala 2.8 project (i guess it was a
>> mistake to start using 2.8, since despite middle of july there are
>> no signs of the promised preview, but now everything is full of
>> default and named args, so no way back.....). the eclipse plug-in
>> ist still hopelessly broken and a PITA. anyone knows if it's
>> possible to work with idea or netbeans on an 2.8 project?
>>
>> thanks, -sciss-
>>
>
Sat, 2009-07-18, 22:57
#3
Re: Which IDE works ATM for Scala 2.8?
Do not make your main-containing object have a companion class. That
annoyingly suppresses the generation of static methods, such as main.
2009/7/18 Sciss :
> in the meantime, a very urgent request for help: at this moment, all i get
> when launching my application is
>
> Exception in thread "main" java.lang.NoSuchMethodError: main
>
> this also happens from the terminal, using
>
> $ java -cp bin:lib2/scala-library.jar de.sciss.tint.nuages.Nuages
>
> the main class _is there_ (e.g. bin/de/sciss/tint/nuages/Nuages.class
> exists) , so this got compiled:
>
> package de.sciss.tint.nuages
>
> import _root_.de.sciss.tint.sc.{ Server, ServerOptions }
> import _root_.java.awt.{ EventQueue }
> import _root_.java.awt.event.{ WindowAdapter, WindowEvent }
> import _root_.javax.swing.{ JFrame, WindowConstants }
>
> object Nuages {
> def main( args : Array[ String ]) {
> EventQueue.invokeLater( new Runnable { def run = new
> Nuages })
> }
> }
>
> class Nuages { .... }
>
>
> so don't understand the problem. fifteen minutes ago it was launching.
>
> hell.........
>
> thanks, -sciss-
>
>
>
> Am 18.07.2009 um 22:27 schrieb Sciss:
>
>> hi,
>>
>> i urgently need to work on a Scala 2.8 project (i guess it was a mistake
>> to start using 2.8, since despite middle of july there are no signs of the
>> promised preview, but now everything is full of default and named args, so
>> no way back.....). the eclipse plug-in ist still hopelessly broken and a
>> PITA. anyone knows if it's possible to work with idea or netbeans on an 2.8
>> project?
>>
>> thanks, -sciss-
>>
>
>
Sat, 2009-07-18, 23:07
#4
Re: Which IDE works ATM for Scala 2.8?
i intuitively guessed that when i renamed Nuages (class) to something
else, so that really fixed it. is this a known bug? i mean coming
from java, the first thing you do in a GUI application is you
instantiate the main class... this would be a common trap i think.
thanks for the hint! ciao, -sciss-
Am 18.07.2009 um 23:47 schrieb Ricky Clarkson:
> Do not make your main-containing object have a companion class. That
> annoyingly suppresses the generation of static methods, such as main.
>
> 2009/7/18 Sciss :
>> in the meantime, a very urgent request for help: at this moment,
>> all i get
>> when launching my application is
>>
>> Exception in thread "main" java.lang.NoSuchMethodError: main
>>
>> this also happens from the terminal, using
>>
>> $ java -cp bin:lib2/scala-library.jar de.sciss.tint.nuages.Nuages
>>
>> the main class _is there_ (e.g. bin/de/sciss/tint/nuages/Nuages.class
>> exists) , so this got compiled:
>>
>> package de.sciss.tint.nuages
>>
>> import _root_.de.sciss.tint.sc.{ Server, ServerOptions }
>> import _root_.java.awt.{ EventQueue }
>> import _root_.java.awt.event.{ WindowAdapter, WindowEvent }
>> import _root_.javax.swing.{ JFrame, WindowConstants }
>>
>> object Nuages {
>> def main( args : Array[ String ]) {
>> EventQueue.invokeLater( new Runnable { def
>> run = new
>> Nuages })
>> }
>> }
>>
>> class Nuages { .... }
>>
>>
>> so don't understand the problem. fifteen minutes ago it was
>> launching.
>>
>> hell.........
>>
>> thanks, -sciss-
>>
>>
>>
>> Am 18.07.2009 um 22:27 schrieb Sciss:
>>
>>> hi,
>>>
>>> i urgently need to work on a Scala 2.8 project (i guess it was a
>>> mistake
>>> to start using 2.8, since despite middle of july there are no
>>> signs of the
>>> promised preview, but now everything is full of default and named
>>> args, so
>>> no way back.....). the eclipse plug-in ist still hopelessly
>>> broken and a
>>> PITA. anyone knows if it's possible to work with idea or netbeans
>>> on an 2.8
>>> project?
>>>
>>> thanks, -sciss-
>>>
>>
>>
>
>
>
Sat, 2009-07-18, 23:17
#5
Re: Which IDE works ATM for Scala 2.8?
It's known, and not a bug, as such, and as such it's not a bug.
class X {
def foo = 5
}
object X {
def foo = 10
}
This generates .class files that decompile to the following Java, roughly:
public class X {
public int foo() {
return 5;
}
}
public class X$ {
public static final X$ MODULE$ = new X$();
public int foo() {
return 10;
}
}
If scalac generated a static forwarder, X.class would theoretically
decompile to:
public class X {
public int foo() {
return 5;
}
public static int foo() {
return X$.MODULE$.foo();
}
}
But that's invalid Java; you can't overload when a method only differs
from another by whether it's static. Class files have the same
restriction. So Scala refuses to generate any static forwarders for a
companion object, to avoid nasty surprises. It's arguably overly
conservative though, and I'd love to see this improved.
2009/7/18 Sciss :
> i intuitively guessed that when i renamed Nuages (class) to something else,
> so that really fixed it. is this a known bug? i mean coming from java, the
> first thing you do in a GUI application is you instantiate the main class...
> this would be a common trap i think.
>
> thanks for the hint! ciao, -sciss-
>
>
> Am 18.07.2009 um 23:47 schrieb Ricky Clarkson:
>
>> Do not make your main-containing object have a companion class. That
>> annoyingly suppresses the generation of static methods, such as main.
>>
>> 2009/7/18 Sciss :
>>>
>>> in the meantime, a very urgent request for help: at this moment, all i
>>> get
>>> when launching my application is
>>>
>>> Exception in thread "main" java.lang.NoSuchMethodError: main
>>>
>>> this also happens from the terminal, using
>>>
>>> $ java -cp bin:lib2/scala-library.jar de.sciss.tint.nuages.Nuages
>>>
>>> the main class _is there_ (e.g. bin/de/sciss/tint/nuages/Nuages.class
>>> exists) , so this got compiled:
>>>
>>> package de.sciss.tint.nuages
>>>
>>> import _root_.de.sciss.tint.sc.{ Server, ServerOptions }
>>> import _root_.java.awt.{ EventQueue }
>>> import _root_.java.awt.event.{ WindowAdapter, WindowEvent }
>>> import _root_.javax.swing.{ JFrame, WindowConstants }
>>>
>>> object Nuages {
>>> def main( args : Array[ String ]) {
>>> EventQueue.invokeLater( new Runnable { def run =
>>> new
>>> Nuages })
>>> }
>>> }
>>>
>>> class Nuages { .... }
>>>
>>>
>>> so don't understand the problem. fifteen minutes ago it was launching.
>>>
>>> hell.........
>>>
>>> thanks, -sciss-
>>>
>>>
>>>
>>> Am 18.07.2009 um 22:27 schrieb Sciss:
>>>
>>>> hi,
>>>>
>>>> i urgently need to work on a Scala 2.8 project (i guess it was a mistake
>>>> to start using 2.8, since despite middle of july there are no signs of
>>>> the
>>>> promised preview, but now everything is full of default and named args,
>>>> so
>>>> no way back.....). the eclipse plug-in ist still hopelessly broken and a
>>>> PITA. anyone knows if it's possible to work with idea or netbeans on an
>>>> 2.8
>>>> project?
>>>>
>>>> thanks, -sciss-
>>>>
>>>
>>>
>>
>>
>>
>> --
>> Ricky Clarkson
>> Java Programmer, AD Holdings
>> +44 1565 770804
>> Skype: ricky_clarkson
>> Google Talk: ricky.clarkson@gmail.com
>
>
Sun, 2009-07-19, 00:07
#6
Re: Which IDE works ATM for Scala 2.8?
Actually it is a bug that it doesn't generate forwarders where there
are no conflicts, and two attempts to solve it have caused problems
elsewhere and thus been reverted:
https://lampsvn.epfl.ch/trac/scala/ticket/1735
Thanks to Paul for pointing that out. Smoke signals say that the
reasons for those problems have been identified recently.
2009/7/18 Ricky Clarkson :
> It's known, and not a bug, as such, and as such it's not a bug.
>
> class X {
> def foo = 5
> }
>
> object X {
> def foo = 10
> }
>
> This generates .class files that decompile to the following Java, roughly:
>
> public class X {
> public int foo() {
> return 5;
> }
> }
>
> public class X$ {
> public static final X$ MODULE$ = new X$();
>
> public int foo() {
> return 10;
> }
> }
>
> If scalac generated a static forwarder, X.class would theoretically
> decompile to:
>
> public class X {
> public int foo() {
> return 5;
> }
> public static int foo() {
> return X$.MODULE$.foo();
> }
> }
>
> But that's invalid Java; you can't overload when a method only differs
> from another by whether it's static. Class files have the same
> restriction. So Scala refuses to generate any static forwarders for a
> companion object, to avoid nasty surprises. It's arguably overly
> conservative though, and I'd love to see this improved.
>
> 2009/7/18 Sciss :
>> i intuitively guessed that when i renamed Nuages (class) to something else,
>> so that really fixed it. is this a known bug? i mean coming from java, the
>> first thing you do in a GUI application is you instantiate the main class...
>> this would be a common trap i think.
>>
>> thanks for the hint! ciao, -sciss-
>>
>>
>> Am 18.07.2009 um 23:47 schrieb Ricky Clarkson:
>>
>>> Do not make your main-containing object have a companion class. That
>>> annoyingly suppresses the generation of static methods, such as main.
>>>
>>> 2009/7/18 Sciss :
>>>>
>>>> in the meantime, a very urgent request for help: at this moment, all i
>>>> get
>>>> when launching my application is
>>>>
>>>> Exception in thread "main" java.lang.NoSuchMethodError: main
>>>>
>>>> this also happens from the terminal, using
>>>>
>>>> $ java -cp bin:lib2/scala-library.jar de.sciss.tint.nuages.Nuages
>>>>
>>>> the main class _is there_ (e.g. bin/de/sciss/tint/nuages/Nuages.class
>>>> exists) , so this got compiled:
>>>>
>>>> package de.sciss.tint.nuages
>>>>
>>>> import _root_.de.sciss.tint.sc.{ Server, ServerOptions }
>>>> import _root_.java.awt.{ EventQueue }
>>>> import _root_.java.awt.event.{ WindowAdapter, WindowEvent }
>>>> import _root_.javax.swing.{ JFrame, WindowConstants }
>>>>
>>>> object Nuages {
>>>> def main( args : Array[ String ]) {
>>>> EventQueue.invokeLater( new Runnable { def run =
>>>> new
>>>> Nuages })
>>>> }
>>>> }
>>>>
>>>> class Nuages { .... }
>>>>
>>>>
>>>> so don't understand the problem. fifteen minutes ago it was launching.
>>>>
>>>> hell.........
>>>>
>>>> thanks, -sciss-
>>>>
>>>>
>>>>
>>>> Am 18.07.2009 um 22:27 schrieb Sciss:
>>>>
>>>>> hi,
>>>>>
>>>>> i urgently need to work on a Scala 2.8 project (i guess it was a mistake
>>>>> to start using 2.8, since despite middle of july there are no signs of
>>>>> the
>>>>> promised preview, but now everything is full of default and named args,
>>>>> so
>>>>> no way back.....). the eclipse plug-in ist still hopelessly broken and a
>>>>> PITA. anyone knows if it's possible to work with idea or netbeans on an
>>>>> 2.8
>>>>> project?
>>>>>
>>>>> thanks, -sciss-
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Ricky Clarkson
>>> Java Programmer, AD Holdings
>>> +44 1565 770804
>>> Skype: ricky_clarkson
>>> Google Talk: ricky.clarkson@gmail.com
>>
>>
>
>
>
> --
> Ricky Clarkson
> Java Programmer, AD Holdings
> +44 1565 770804
> Skype: ricky_clarkson
> Google Talk: ricky.clarkson@gmail.com
>
Sun, 2009-07-19, 09:47
#7
Re: Which IDE works ATM for Scala 2.8?
On Sat, 2009-07-18 at 23:58 +0100, Ricky Clarkson wrote:
> Actually it is a bug that it doesn't generate forwarders where there
> are no conflicts, and two attempts to solve it have caused problems
> elsewhere and thus been reverted:
> https://lampsvn.epfl.ch/trac/scala/ticket/1735
I think a better description would be to say that it's a missing feature
with an open ticket. :)
Ismael
in the meantime, a very urgent request for help: at this moment, all
i get when launching my application is
Exception in thread "main" java.lang.NoSuchMethodError: main
this also happens from the terminal, using
$ java -cp bin:lib2/scala-library.jar de.sciss.tint.nuages.Nuages
the main class _is there_ (e.g. bin/de/sciss/tint/nuages/Nuages.class
exists) , so this got compiled:
package de.sciss.tint.nuages
import _root_.de.sciss.tint.sc.{ Server, ServerOptions }
import _root_.java.awt.{ EventQueue }
import _root_.java.awt.event.{ WindowAdapter, WindowEvent }
import _root_.javax.swing.{ JFrame, WindowConstants }
object Nuages {
def main( args : Array[ String ]) {
EventQueue.invokeLater( new Runnable { def run = new Nuages })
}
}
class Nuages { .... }
so don't understand the problem. fifteen minutes ago it was launching.
hell.........
thanks, -sciss-
Am 18.07.2009 um 22:27 schrieb Sciss:
> hi,
>
> i urgently need to work on a Scala 2.8 project (i guess it was a
> mistake to start using 2.8, since despite middle of july there are
> no signs of the promised preview, but now everything is full of
> default and named args, so no way back.....). the eclipse plug-in
> ist still hopelessly broken and a PITA. anyone knows if it's
> possible to work with idea or netbeans on an 2.8 project?
>
> thanks, -sciss-
>