Custom Search
|
Date: February 27, 2006
From: Niels Hoogeveen <pd_aficionado@xxxxxxxxxxx>
References:
<loom.20060224T124419-759@xxxxxxxxxxxxxx> <43FF321D.1070900@xxxxxxx>
Dear Martin, I copied the example of the typed evaluator from the paper related to Scala2. This gives a typing error in eclipse, just like it does using the standard Scala2 compiler. When I enable the -Xgadt flag (with the standard compiler, outside of Eclipse) a typing error no longer appears and the generated code performs the way I expect it to. The Eclipse plugin does not give me any hooks and angles to set the -Xgadt flag (or am I missing something?). I modified the compiler code to have -Xgadt on by default and loaded the typed evaluator code in Eclipse, which leads to proper type checking, compilation, and execution, but unfortunately also to a loadtime error of the eclipse plugin. k.r. Niels
Date: February 27, 2006
From: Lex Spoon <lex@xxxxxxxxxxxxx>
References:
<a793ba4b0602241947p5d214135ge846e77f006a990@xxxxxxxxxxxxxx>
"Jason Kinzer" <jmkinzer@xxxxxxxxx> writes:
> I've stumbled upon a typing issue I'm at a loss to explain. Following is a
> minimal test case:
>
> ---------------------------------------------
> // ScalaMenuTest.scala
> object ScalaMenuTest {
> def main(args: Array[String]): Unit = {
> val v = new javax.swing.JMenu()
> v.add(new javax.swing.JMenuItem())
> //v.add(new java.awt.PopupMenu());
> }
> }
>
> //==> compiling with scalac2 results in
> //
> // found : javax.swing.JMenuItem
> // required: java.awt.PopupMenu
> // v.add(new javax.swing.JMenuItem())
> // ^
> //one error found
> ---------------------------------------------
There have been problems like this, but your example compiles for
me using version 2.0.5843 and 2.0.5774 . Can you check your
version (scalac -version), and upgrade if it is older than these?
Otherwise, maybe it is environmental. I am using a 1.5 Sun SDK.
-Lex
Date: February 25, 2006
From: "Jason Kinzer" <jmkinzer@xxxxxxxxx>
Date: February 24, 2006
From: Martin Odersky <martin.odersky@xxxxxxx>
In-reply-to:
<loom.20060224T124419-759@xxxxxxxxxxxxxx>
References:
<loom.20060224T124419-759@xxxxxxxxxxxxxx>
Niels Hoogeveen wrote:
I'm trying to toy around with Scala2 within Eclipse, but I can's seem to find a proper way to set the -Xgadt flag, any suggestions?If you want to play with GADT's there is acturaly no need to change the flag. Gadts are already enabled for function paramters in Scala 2. The - Xgadt flag enables them also for class constructor parameters, but this is not working completely right now.
Cheers -- Martin
Date: February 24, 2006
From: Niels Hoogeveen <pd_aficionado@xxxxxxxxxxx>
I'm trying to toy around with Scala2 within Eclipse, but I can's seem to find a proper way to set the -Xgadt flag, any suggestions? k.r. Niels
Date: February 23, 2006
From: Sean McDirmid <sean.mcdirmid@xxxxxxx>
Greetings,There was a bug in the 2.1.7 plugin that would cause random compiler crashes. The 2.1.8 release fixes this bug.
Thanks, Sean
Date: February 23, 2006
From: Burak Emir <Burak.Emir@xxxxxxx>
In-reply-to:
<D02E058A-4234-4283-9085-81CF40AC33EC@xxxxxxxxxx>
References:
<C026CCB0-6886-4CD3-910F-7DA450DCE099@xxxxxxxxxx> <43FC319A.2080308@xxxxxxx> <32F1DD72-417B-4800-BAC4-D74B636CA2C9@xxxxxxxxxx> <43FC4677.7070908@xxxxxxx> <37224418-9245-469D-9CDF-C55B1550A210@xxxxxxxxxx> <1140627662.43fc98ce818c7@xxxxxxxxxxxxxxx> <D02E058A-4234-4283-9085-81CF40AC33EC@xxxxxxxxxx>
Hello,would it be ok to assume that each namespace prefix f is bound in the same xquery file?
Then adding this could be straightforward. A full implementation that handles imports seems like more work.
cheers, B. Molnár Balázs wrote:
Any plans on supporting XQuery function definitions like this one here ?
declare function f:fibo($n as xs:integer) as item() {
if ($n = 0)
then 0
else if ($n = 1)
then 1
else (f:fibo($n - 1) + f:fibo($n -2))
};
regards,
Balazs
-- Burak Emir http://lamp.epfl.ch/~emir
Date: February 22, 2006
From: Sean McDirmid <sean.mcdirmid@xxxxxxx>
In-reply-to:
<43FC7157.8030505@xxxxxxx>
References:
<c75af2210602210915g2c670161g88209865603ab6c8@xxxxxxxxxxxxxx> <43FC7157.8030505@xxxxxxx>
Sean McDirmid wrote:
Greetings Scala programmers,I've just put version 2.1.7 of the Scala Eclipse plugin on the update site (http://lamp.epfl.ch/~mcdirmid/scala-plugin). This version fixes many bugs and if you are using the plugin you should probably upgrade. Here is a list of the bugs that are fixed:* More Scala elements are now highlighted (from 90% to 95% of Scala's features are supported) -- Type aliases, imports, constants, and uses of overloaded assignment (=) are still not highlighted.* Cut/paste/select indent now work correctly with the highlighter. * Resident compiler should crash less often -- Its still known to crash in certain circumstances. Please keep the bug reports flowing in! Thanks, Sean
Date: February 22, 2006
From: Sean McDirmid <sean.mcdirmid@xxxxxxx>
In-reply-to:
<c75af2210602210915g2c670161g88209865603ab6c8@xxxxxxxxxxxxxx>
References:
<c75af2210602210915g2c670161g88209865603ab6c8@xxxxxxxxxxxxxx>
Greetings Scala programmers,I've just put version 2.1.7 of the Scala Eclipse plugin on the update site (http://lamp.epfl.ch/~mcdirmid/scala-plugin). This version fixes many bugs and if you are using the plugin you should probably upgrade. Here is a list of the bugs that are fixed:
* More Scala elements are now highlighted (from 90% to 95% of Scala's features are supported) -- Type aliases, imports, constants, and uses of overloaded assignment (=) are still not highlighted.
* Cut/paste/select indent now work correctly with the highlighter. * Resident compiler should crash less often -- Its still known to crash in certain circumstances. Please keep the bug reports flowing in! Thanks, Sean
Date: February 22, 2006
From: Burak Emir <Burak.Emir@xxxxxxx>
In-reply-to:
<C026CCB0-6886-4CD3-910F-7DA450DCE099@xxxxxxxxxx>
References:
<C026CCB0-6886-4CD3-910F-7DA450DCE099@xxxxxxxxxx>
Dear Molnar and others, Molnár Balázs wrote:
I put the new tarball of the sources on http://lamp.epfl.ch/~emir/projects (it includes also some other little tools)When do you think you would make available the new Scalax package ?
schema2src (data binding tool) xquery2src (translates XQuery to Scala) xslt2src (translates XSLT to Scala) pex (persistent xml) xinc (Rusty Harold's SAXXIncluder in Scala)plus the sources used in the draft book are now part of the archive. Get more for your money - now :-)
Note: I did not add namespace declaration support to xquery. But I'd gladly check in a patch :-)
Here's another way of keeping up to date with scalax: since we are gathering all our Scala projects together, you could also get the latest scalax stuff directly from the Scala SVN repository. This is described on http://scala.epfl.ch/downloads/svn.html
hope you find this useful. cheers, Burak -- Burak Emir http://lamp.epfl.ch/~emir
Date: February 21, 2006
From: Sean McDirmid <sean.mcdirmid@xxxxxxx>
In-reply-to:
<c75af2210602210915g2c670161g88209865603ab6c8@xxxxxxxxxxxxxx>
References:
<c75af2210602210915g2c670161g88209865603ab6c8@xxxxxxxxxxxxxx>
On Feb 21, 2006, at 6:15 PM, Andrei Formiga wrote:
I tested the plugin with 3.2M5. It mostly works: editor and compilation are ok, but I'm not able to create launch configurations for a Scala Application. The launch configurations dialog has changed from M4, so I believe there should be some simple adjustment. -- []s, Andrei Formiga
Date: February 21, 2006
From: "Andrei Formiga" <andrei.formiga@xxxxxxxxx>
I tested the plugin with 3.2M5. It mostly works: editor and compilation are ok, but I'm not able to create launch configurations for a Scala Application. The launch configurations dialog has changed from M4, so I believe there should be some simple adjustment. -- []s, Andrei Formiga
Date: February 21, 2006
From: Lex Spoon <lex@xxxxxxxxxxxxx>
References:
<91a2ba3e0602171700g3887078duc7d1982741ce44d1@xxxxxxxxxxxxxx>
"Raoul Duke" <raould@xxxxxxxxx> writes: > Is there an updated interpreter that comes with Scala 2? Using the 1.x > interpreter, I seem to tend to run into the "some bugs" somewhat > frequently > (http://article.gmane.org/gmane.comp.lang.scala/1214/match=interpreter). > > many thanks for all your work on Scala! It so happens that there is one, as of a few days ago. Moez Abdel-Gawad (moez@xxxxxxxxxxx) put together the original version, and I cleaned it up a bit. If you upgrade your sbaz directory you can install "scalaint". Let us know what you think! -Lex
Date: February 21, 2006
From: Lex Spoon <lex@xxxxxxxxxxxxx>
References:
<dtcq6f$2kd$1@xxxxxxxxxxxxx>
The "2" suffixes were used during the beta. We plan to make Scala 2 the official Scala soon, so we are renaming everything back to simply scala.bat, scala-library.jar, and so on. The classpath chosen by scala.bat does not seem good for reasons other than the one you mention: it does not properly handle classpath's that override stuff from the bazaar, e.g. if you are developing a new version of a package that has been previously published. I also agree that "." should be included in the normal class path, so long as there is some way to turn off > Is the sources library needed for compiling on scala2 like sources > were needed for scala1 ? I don't believe so. [ SCALA_HOME versus _SCALA_HOME ] Yes, there's a mismatch there, thanks! -Lex
Date: February 21, 2006
From: "Judson, Ross" <rjudson@xxxxxxxxxxxxxxxxxx>
Cool...hope it works out. There might be a few odd interactions with the forthcoming scala reflection API. Funny how I look at things and think about how to reimplement them in Scala. I've been looking at Mini-Kanren as a test, and also wondering about CHR -- Scala's flexible syntax might work out pretty nicely for that too. RJ -----Original Message----- From: Jamie Webb [mailto:j@xxxxxxxxxxxxxxx] Sent: Saturday, February 18, 2006 7:54 AM To: scala@xxxxxxxxxxxxxx Subject: Re: against the components utopia On Fri, Feb 17, 2006 at 09:47:57AM -0500, Judson, Ross wrote: > Have you guys seen classworlds? Yes. It's exactly the sort of thing I'm talking about. I evaluated it for Kitten, but it didn't quite fit my needs because of a few rather minor details about the way 'realms' interact. Since as you say it's not much code at all, I decided to reimplement it in Scala. The tricky bit is going to be actually using the thing... -- Jamie Webb
Date: February 20, 2006
From: "Gabriel Riba" <griba2010@xxxxxx>
References:
<dtcq6f$2kd$1@xxxxxxxxxxxxx>
I am sorry, I should say "could be" instead of "should be". I do not want to appear unpolite. My language is not english and sometimes I dont employ the best words. "Gabriel Riba" <griba2010@xxxxxx> ha escrit en el missatge dels grups de discussió:dtcq6f$2kd$1@xxxxxxxxxxxxxxxx > ----------------------------------------- > > I am on windows (xp pro). > > scala.bat does not work after sbaz-boot install, because java cannot find the > working app classes, > so for me it works after including '.' so > > set _CLASSPATH= > if not "%_CLASSPATH%"=="" goto args > > should be > > set _CLASSPATH=. > if not "%_CLASSPATH%"=="." goto args > this way you can call scala.bat from the package base without problems. > ---------------------------------------------------------- > > On sbaz.bat the lines > > :exec > set _PROPS=-Dscala.home="%SCALA_HOME%" ... > > should be > > :exec > set _PROPS=-Dscala.home="%_SCALA_HOME%" ... > > to use "_SCALA_HOME" as defined inside for Windows_NT as parent of batch file > dir. > > to avoid changing SCALA_HOME between the working scala compiler directory and > the sbaz directory > if SCALA_HOME does not point to the sbaz dir. you get the message "<scala_home> does not appear to be an sbaz managed directory" so using the code for _SCALA_HOME makes sbaz use without problems. Cheers! Gabriel.
Date: February 20, 2006
From: "Gabriel Riba" <griba2010@xxxxxx>
Hi! There is some confusion with the compiler packages names. The bootstrap sbaz-boot.zip file comes with version 2.0.5795 at the moment with files named scala, scalac, scala-compiler.jar, ... without suffixes. Then there are some scala2, scalac2, scala2-library packages that install files scala2, scalac2, scala2-compiler.jar, .. with the "2" suffix. After sbaz "available" pkg listing I thought that maybe scala1 was on the boot package which I realized it was not the case. Which are the official file names ? ----------------------------------------- I have seen that the eclipse plugin compiler includes scala-library-src.jar with sources probably for mixin use but I have not seen this library on any sbaz package ? Is the sources library needed for compiling on scala2 like sources were needed for scala1 ? ----------------------------------------- I am on windows (xp pro). scala.bat does not work after sbaz-boot install, because java cannot find the working app classes, so for me it works after including '.' so set _CLASSPATH= if not "%_CLASSPATH%"=="" goto args should be set _CLASSPATH=. if not "%_CLASSPATH%"=="." goto args ---------------------------------------------------------- On sbaz.bat the lines :exec set _PROPS=-Dscala.home="%SCALA_HOME%" ... should be :exec set _PROPS=-Dscala.home="%_SCALA_HOME%" ... to use "_SCALA_HOME" as defined inside for Windows_NT as parent of batch file dir. to avoid changing SCALA_HOME between the working scala compiler directory and the sbaz directory ----------------------------------------------- Cheers! Gabriel
Date: February 20, 2006
From: Vijay Saraswat <vijay@xxxxxxxxxxxx>
In-reply-to:
<744BCFDD-98CE-47C6-8576-DE8025F2F667@xxxxxxx>
References:
<65ca665cdc.65cdc65ca6@xxxxxxxxxxxx> <43F9ACB9.2010402@xxxxxxxxxxxx> <744BCFDD-98CE-47C6-8576-DE8025F2F667@xxxxxxx>
|
This problem is now resolved. I was running 1.5 beta. To run this
plug-in, you need to run the latest version of 1.5 (1.5beta wont do). Again, if you are unable to edit Scala source files, check the Error log, and if you see a traceback containing ============= java.lang.NoSuchMethodError:
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
at
ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199)
=============chances are you are not running with the *latest* jdk1.5 (you may be running java 1.4 or java 1.5beta). Upgrading to jdk1.5 should fix this problem. Thanks for debugging this, Sean! Best, Vijay PS: For those who want to know how to find out which java your Eclipse is running on, click Help -> Configuration Details and look for "-vm". By default, Eclipse will run with the first Java it finds on your PATH. You can specify an explicit VM for Eclipse to use from the command line, using the -vm option. I am not sure but I think there is no way to tell Eclipse (from within Eclipse) to run plug-ins on different VMs. =================================================================== Sean McDirmid wrote: Hi Vijay, |
Date: February 20, 2006
From: Sean McDirmid <sean.mcdirmid@xxxxxxx>
In-reply-to:
<43F9ACB9.2010402@xxxxxxxxxxxx>
References:
<65ca665cdc.65cdc65ca6@xxxxxxxxxxxx> <43F9ACB9.2010402@xxxxxxxxxxxx>
| Hi Vijay, I think the problem is that you are running Eclipse with 1.4, it might still let you run programs with 1.5 installation. The stack trace you gave me often occurs when 1.5 code is run under 1.4, which made substantial changes to the java.lang.String and StringBuffer classes. To confirm, go to "Help/About Eclipse SDK/Configuration Details" and look at your java.runtime.version property, it will tell you what Java version Eclipse is running under. Sean java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; at ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199) at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327) at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349) at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1231) at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) On Feb 20, 2006, at 12:49 PM, Vijay Saraswat wrote: Sean Mc Dirmid wrote: |
Date: February 20, 2006
From: Vijay Saraswat <vijay@xxxxxxxxxxxx>
In-reply-to:
<65ca665cdc.65cdc65ca6@xxxxxxxxxxxx>
References:
<65ca665cdc.65cdc65ca6@xxxxxxxxxxxx>
Sean Mc Dirmid wrote:Hmm. I had read your messages and knew that the plug-in needed 1.5. My earlier Eclipse install was using 1.5.Hi Vijay, This sounds like a problem of not using Java 1.5. The plugin is only supported (and will only work under) Java 1.5. This is a big problem, and there doesn't seem to be a way in Eclipse to prevent users from installing the As far as I can tell, this new Eclipse install is also running Java 1.5. In Eclipse, Windows -> Preferences -> Java -> Installed JREs, the only Installed JRE is jdk1.5.0. I also checked all the entries in Windows -> Preferences -> Java -> Installed JREs -> Execution Environments and made sure that for each of them (e.g. CDC-1.0/Foundation-1.0, CDC-1.1/Foundation-1.1 etc) the only "Compatible JRE" listed was jdk1.5.0, and it was checked. Finally, I created a little Java project, and a Java source file with generics. I am able to edit, compile, run this code without problems from within Eclipse. (When Eclipse does work, its great!) So this Eclipse definitely knows about jdk1.5. Again, this is a brand new Eclipse, out of the box. java/javac from my bash command line resolve to c:\Program Files\jdk1.5.0 and apparently thats what Eclipse picked up. I am not familiar with how Eclipse determines which java to use to run its plug-ins. Is there some other place that this is supposed to be specified? Maybe you can catch the exception and print out a message in the Error log asking the user to check the version of Java in Eclipse (if that is the problem).plugin if they are running Java 1.4. I'll try to improve the documentation somehow so its more obvious (maybe put it in the title of the download). Also, while I am at it, perhaps the page http://scala.epfl.ch/docu/eclipse/ should be updated to point to a page that describes your plugin...? Best, Vijay Thanks! Sean ----- Original Message ----- From: Vijay Saraswat <vijay@xxxxxxxxxxxx> Date: Monday, February 20, 2006 3:38 am Subject: Unable to edit Scala files in Eclipse...? |
Date: February 20, 2006
From: Sean Mc Dirmid <sean.mcdirmid@xxxxxxx>
Hi Vijay, This sounds like a problem of not using Java 1.5. The plugin is only supported (and will only work under) Java 1.5. This is a big problem, and there doesn't seem to be a way in Eclipse to prevent users from installing the plugin if they are running Java 1.4. I'll try to improve the documentation somehow so its more obvious (maybe put it in the title of the download). Thanks! Sean ----- Original Message ----- From: Vijay Saraswat <vijay@xxxxxxxxxxxx> Date: Monday, February 20, 2006 3:38 am Subject: Unable to edit Scala files in Eclipse...? > Hi Sean -- > > I cant edit any Scala file with the plug-in.. is this a bug or did > I do > something wrong? > > Best, > Vijay > ===================================== > > I am working with Eclipse 3.2M: > Eclipse SDK > > Version: 3.2.0 > Build id: I20051215-1506 > ===================== > > Just downloaded a fresh Eclipse install. Installed Scala plugin > (2.1.6) > from the website, created a Scala project (fine), created a new > Scala > file (fine). But now I cant edit the file! (The file is readonly.) > > The error log says: > > ================================== > java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/ String; > java.lang.NoSuchMethodError: > java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/ String; > at > ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand (ScalaSourceViewerConfiguration.java:199) > at > org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327) > at > org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349)at > org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent (ProjectionViewer.java:1231) > at > org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359) > at > org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194)at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923) > at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:695) > at > org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5733)at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6455) > at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2083) > at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5049) > at > org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5074)at org.eclipse.swt.custom.StyledText $7.handleEvent(StyledText.java:4814) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923) > at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951) > at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947) > at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261) > at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311) > at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212) > at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963) > at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) > at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726) > at > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397) > at > org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) > at > org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLauncher.java:92) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.java:68) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:494) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) > at org.eclipse.core.launcher.Main.basicRun(Main.java:282) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) > ======================================== > > >
Date: February 20, 2006
From: Vijay Saraswat <vijay@xxxxxxxxxxxx>
Hi Sean --I cant edit any Scala file with the plug-in.. is this a bug or did I do something wrong?
Best, Vijay ===================================== I am working with Eclipse 3.2M: Eclipse SDK Version: 3.2.0 Build id: I20051215-1506 =====================Just downloaded a fresh Eclipse install. Installed Scala plugin (2.1.6) from the website, created a Scala project (fine), created a new Scala file (fine). But now I cant edit the file! (The file is readonly.)
The error log says: ================================== java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; at ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199) at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327)
at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349)at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1231) at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:695) at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5733) at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6455) at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2083) at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5049) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5074) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4814) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) ========================================
!SESSION 2006-02-19 21:26:20.697 -----------------------------------------------
eclipse.buildId=I20051215-1506
java.version=1.5.0-beta
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.ui 4 4 2006-02-19 21:27:36.896
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 2006-02-19 21:27:36.896
!MESSAGE
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
!STACK 0
java.lang.NoSuchMethodError:
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
at
ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199)
at
org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327)
at
org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1231)
at
org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:695)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5733)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6455)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2083)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5049)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5074)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4814)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
!ENTRY org.eclipse.ui 4 4 2006-02-19 21:27:37.217
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 2006-02-19 21:27:37.227
!MESSAGE
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
!STACK 0
java.lang.NoSuchMethodError:
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
at
ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199)
at
org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327)
at
org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1231)
at
org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:695)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5733)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6455)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2083)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5049)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5074)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4814)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
!ENTRY org.eclipse.ui 4 4 2006-02-19 21:27:37.477
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 2006-02-19 21:27:37.497
!MESSAGE
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
!STACK 0
java.lang.NoSuchMethodError:
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
at
ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199)
at
org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327)
at
org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1231)
at
org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:695)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5733)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6455)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2083)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5049)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5074)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4814)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Date: February 18, 2006
From: Jamie Webb <j@xxxxxxxxxxxxxxx>
In-reply-to:
<F418C1909C57A14E9456C8BEA8856345BDBC3F@xxxxxxxxxxxxxxxxxx>
References:
<F418C1909C57A14E9456C8BEA8856345BDBC3F@xxxxxxxxxxxxxxxxxx>
On Fri, Feb 17, 2006 at 09:47:57AM -0500, Judson, Ross wrote: > Have you guys seen classworlds? Yes. It's exactly the sort of thing I'm talking about. I evaluated it for Kitten, but it didn't quite fit my needs because of a few rather minor details about the way 'realms' interact. Since as you say it's not much code at all, I decided to reimplement it in Scala. The tricky bit is going to be actually using the thing... -- Jamie Webb
Date: February 18, 2006
From: "Raoul Duke" <raould@xxxxxxxxx>
Hello, (I was trying to find out the answer to this but am unlucky with sbaz yet :-) Is there an updated interpreter that comes with Scala 2? Using the 1.x interpreter, I seem to tend to run into the "some bugs" somewhat frequently (http://article.gmane.org/gmane.comp.lang.scala/1214/match=interpreter). many thanks for all your work on Scala!
Date: February 18, 2006
From: "Raoul Duke" <raould@xxxxxxxxx>
hello, i'm on cygwin / win xp. using: http://lamp.epfl.ch/~spoon/sbaz/sbaz-boot.zip $ sbaz/bin/sbaz available Exception in thread "main" java.lang.Error: Directory \cygdrive\c\Program Files\ sbaz does not appear to be a sbaz-managed directory at sbaz.ManagedDirectory.<init>(ManagedDirectory.scala:27) at sbaz.clui.CommandLine$.processCommandLine(CommandLine.scala:51) at sbaz.clui.CommandLine$.main(CommandLine.scala:72) at sbaz.clui.CommandLine.main(CommandLine.scala) any ideas? thanks!
Date: February 17, 2006
From: Lex Spoon <lex@xxxxxxxxxxxxx>
References:
<20060206232722.GD15639@xxxxxxxxxxxxxxxx> <873bive7an.fsf@xxxxxxxxxxxxxxxxxx> <20060207134922.GE15639@xxxxxxxxxxxxxxxx> <87y80ncef7.fsf@xxxxxxxxxxxxxxxxxx> <20060208093309.GF15639@xxxxxxxxxxxxxxxx> <8764nowxd3.fsf_-_@xxxxxxxxxxxxxxxxxx> <20060209222204.GA5275@xxxxxxxxxxxxxxxx> <87slqnuy4y.fsf@xxxxxxxxxxxxxxxxxx> <20060213235103.GA15079@xxxxxxxxxxxxxxxx> <87psln1ijt.fsf@xxxxxxxxxxxxxxxxxx> <20060216193025.GE5275@xxxxxxxxxxxxxxxx>
Okay, I see. Keep in mind that once you are willing to do some modification of the code somewhere, then repackaging is a serious option. You can either repackage stuff for a public universe like one of Debian's streams, or you can create a little private universe of your own to hold your hacks. This mechanism is always available, and thus the dependency system and the linker should be designed with that in mind. For the case you mention of of wanting two different libraries, it could simply be a matter of posting one library or both to the local universe, with one of the packages renamed and all the necessary files renamed so that they do not conflict. Given a fancy linker, that's all you need, because the linker can take care of the rest. Given the status quo, you'd probably have more work ahead of you. > I want to use both libA and libB, so I create a union universe. sbaz > will have to install both versions of libZ, because it can't know > whether libA is able to use libZ-2.0 (can it do this? if not, that's a > separate issue). You have to rename one of the two packages, e.g. "libZ" and "libZ2". Letting people install multiple versions of the same package does not strike me as a good deal. For one thing, it invalidates using the filesystem as a single global namespace. Instead, each package must install its files with versions in their paths, just in case someone tries to install a different version of the same package. And each package must *refer* to filenames using a version in addition to the filename. You end up needing some other way to reference files than filenames. For another problem, it complicates dependencies and linking. If A depends on B, but there are five different B's installed, which one does it end up using? Do we then back away from the simple "depends on B" dependencies? That would be a pity. To contrast, the overwhelmingly common intention when there is both "libZ-1.0" and "libZ-1.1" in the universe is that they mutually conflict. Instead of explicitly writing that very common dependency on almost every package, it seems better to use renaming to handle the uncommon (but occuring) situation where you do want to let both of them load simultaneously. I played with FreeBSD for a while, and it would let you install multiple versions of the same package. It became a mess if you "tried" it, and usually when you "try" it was just an accident. Overall, the cost of a little more repackaging seems much lower than the cost of every package having to deal with a system where there are multiple versions of the same package installed. -Lex
Date: February 17, 2006
From: "Judson, Ross" <rjudson@xxxxxxxxxxxxxxxxxx>
Have you guys seen classworlds? http://classworlds.codehaus.org/index.html On first glance it looks like it can solve the libA/libB problem Jamie outlined. Classworlds creates a directed graph of loaders, where each "realm" (universe equivalent?) can import from other realms. I am pretty sure it can handle multiple versions of a library at the same time. We could either use it as is or (since it's relatively small) create the equivalent functionality in Scala. RJ
Date: February 17, 2006
From: Michel Salim <michel.salim@xxxxxxxxx>
In "How to add laziness to a strict language without even being odd", Wadler, Taha and MacQueen categorized the type of streams that Scala implements as "odd" for two reasons: 1. Odd number of constructors (cons, delay, null) 2. Off-by-one error in methods defined on streams such as take I posted a test program at the bug database (bug #111): http://lamppc1s1.epfl.ch/bugtracking/contribs/display.do?id=111 Because the stream's head is eagerly evaluated, the square root of -1 is computed; in Scala this would just silently fail but a function call on an invalid argument could potentially throw an exception here, and that would be undesirable. My question is, what's the best way to fix this? Would making the head of the stream also call-by-name result in much of a performance hit? Or would a less intrusive solution like the one I posted be better? (Just avoid ever taking the tail if its head is never going to be returned; in case of take(n), stop when n==1) Best regards, -- Michel Salim http://www.cs.indiana.edu/~msalim
Date: February 16, 2006
From: Jamie Webb <j@xxxxxxxxxxxxxxx>
In-reply-to:
<87psln1ijt.fsf@xxxxxxxxxxxxxxxxxx>
References:
<20060206232722.GD15639@xxxxxxxxxxxxxxxx> <873bive7an.fsf@xxxxxxxxxxxxxxxxxx> <20060207134922.GE15639@xxxxxxxxxxxxxxxx> <87y80ncef7.fsf@xxxxxxxxxxxxxxxxxx> <20060208093309.GF15639@xxxxxxxxxxxxxxxx> <8764nowxd3.fsf_-_@xxxxxxxxxxxxxxxxxx> <20060209222204.GA5275@xxxxxxxxxxxxxxxx> <87slqnuy4y.fsf@xxxxxxxxxxxxxxxxxx> <20060213235103.GA15079@xxxxxxxxxxxxxxxx> <87psln1ijt.fsf@xxxxxxxxxxxxxxxxxx>
On Thu, Feb 16, 2006 at 09:31:50AM -0500, Lex Spoon wrote: > Jamie Webb <j@xxxxxxxxxxxxxxx> writes: > > [...] it /can/ be avoided for > > Java and Scala /provided/ there's code in place to deal with > > occasional incompatibilities when they do occur. > > Do you mean, the person *installing* the components writes some code, > as a last resort? That would indeed be something I hadn't considered. Sort of. Writing code would be a last resort solution to deal with conflicting external dependencies. Bear in mind that conflicts primarily occur between libraries, not whole applicatons. And just installing two incompatible libraries isn't a problem either (provided they aren't so impolite as to stomp on each other in the filesystem). You actually have to try to load both of them simultaneously to encounter a problem. This means that the developer of a package that depends on two conflicting libraries is in a position write code to resolve the conflict. Often though, conflicts involve internal dependencies. If package writers declare which of their dependencies are internal just as a matter of course, and a linker acts appropriately, no-one need ever notice that those conflicts exist. I should emphasise that I'm not suggesting this scheme can prevent all conflicts, but it may prevent or at least provide a route around most of them. Here's the sort of situation I'm looking to avoid: 'stable' universe contains: libA-1.0 (depends on libZ) libZ-1.0 'libB-unstable' universe: libB-1.0 (depends on libZ) libZ-2.0 I want to use both libA and libB, so I create a union universe. sbaz will have to install both versions of libZ, because it can't know whether libA is able to use libZ-2.0 (can it do this? if not, that's a separate issue). But I still can't load both libA and libB, because whichever version of libZ appears first on the classpath will clobber the other. -- Jamie Webb
Date: February 16, 2006
From: Lex Spoon <lex@xxxxxxxxxxxxx>
References:
<F418C1909C57A14E9456C8BEA8856345BDADAE@xxxxxxxxxxxxxxxxxx> <20060206232722.GD15639@xxxxxxxxxxxxxxxx> <873bive7an.fsf@xxxxxxxxxxxxxxxxxx> <20060207134922.GE15639@xxxxxxxxxxxxxxxx> <87y80ncef7.fsf@xxxxxxxxxxxxxxxxxx> <20060208093309.GF15639@xxxxxxxxxxxxxxxx> <8764nowxd3.fsf_-_@xxxxxxxxxxxxxxxxxx> <20060209222204.GA5275@xxxxxxxxxxxxxxxx> <87slqnuy4y.fsf@xxxxxxxxxxxxxxxxxx> <20060213235103.GA15079@xxxxxxxxxxxxxxxx>
Jamie Webb <j@xxxxxxxxxxxxxxx> writes: > [...] it /can/ be avoided for > Java and Scala /provided/ there's code in place to deal with > occasional incompatibilities when they do occur. Do you mean, the person *installing* the components writes some code, as a last resort? That would indeed be something I hadn't considered. -Lex
Date: February 15, 2006
From: "Gabriel Riba" <griba2010@xxxxxx>
Hi! Because I ran into problems using the Scala1 intro mixin examples (http://scala.epfl.ch/intro/mixin.html) with Eclipse plugin 2.x I've tried to rewrite the code for Scala2 showing some new features ------------------------ package test; /* Scala2 replacement code for http://scala.epfl.ch/intro/mixin.html */ class Point2D(xc: Int, yc: Int) { val x = xc val y = yc // Scala2 now automatically applies methods // with empty parameter lists // to () argument lists when necessary // so we can write 'toString' instead of 'toString()' override def toString = "x = " + x + ", y = " + y } class Point3D(xc: Int, yc: Int, zc: Int) extends Point2D(xc, yc) { // Linearization (inheritance class sequence) // = { Point3D ,Point2D, AnyRef, Any} val z = zc override def toString = super.toString + ", z = " + z } // mixins cannot have class parameters // so we have to extract the code from Scala1 ColoredPoint2D // in order to use it as mixin mixin class Colorable { var color: String = _ def setColor(newCol: String): Unit = color = newCol override def toString = // super in a mixin class refers to the base class // in a mixin inheritance sequence (also called class Linearization) super.toString + ", col = " + color def mostVisible = "Color" } class ColoredPoint2D( xc: Int, yc: Int, c: String) extends Point2D( xc, yc) with Colorable { // Linearization (inheritance class sequence) // = { ColoredPoint2D ,Colorable ,Point2D, AnyRef, Any} setColor( c) } clas