View previous topic :: View next topic |
Author |
Message |
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Apr 16, 2007 1:45 am Post subject: Win32 troubles |
|
|
I checkout the tioport's trunk
I download the latest tango release (I don't checkout because the release is from today)
DMD 1.012
Code: | rebuild -rfpaint_win32_rebuild.rf
tango\io\FileConduit.d(261): function tango.io.FileConduit.FileConduit.toUtf8 function toUtf8 does not override any
tango\io\FileConduit.d(261): function tango.io.FileConduit.FileConduit.toUtf8 function toUtf8 does not override any |
I open this file and comment the 'override' keyword before the function.
Code: | rebuild -rfpaint_win32_rebuild.rf
..\..\..\src\dejavu\dejavu\lang\JObjectImpl.d(57): function dejavu.lang.JObjectImpl.JObjectImpl.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\StringBuffer.d(291): function dejavu.lang.StringBuffer.StringBuffer.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\AbstractStringBuilder.d(263): function dejavu.lang.AbstractStringBuilder.AbstractStringBuilder.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\StringBuilder.d(208): function dejavu.lang.StringBuilder.StringBuilder.toString of type String() overrides but is not covariantwith object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\io\File.d(198): function dejavu.io.File.File.toStringof type String() overrides but is not covariant with object.Object.toString oftype char[]()
..\..\..\src\dejavu\dejavu\lang\Throwable.d(50): function dejavu.lang.Throwable.Throwable.toString of type String() overrides but is not covariant with object.Exception.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\String.d(484): function dejavu.lang.String.String.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Byte.d(98): function dejavu.lang.Byte.Byte.toString of type String() overrides but is not covariant with object.Object.toStringof type char[]()
..\..\..\src\dejavu\dejavu\lang\Boolean.d(52): function dejavu.lang.Boolean.Boolean.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Integer.d(107): function dejavu.lang.Integer.Integer.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Long.d(118): function dejavu.lang.Long.Long.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Float.d(84): function dejavu.lang.Float.Float.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Double.d(81): function dejavu.lang.Double.Double.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Character.d(107): function dejavu.lang.Character.Character.Subset.toString of type String() overrides but is not covariant withobject.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Character.d(688): function dejavu.lang.Character.Character.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\JObjectImpl.d(57): function dejavu.lang.JObjectImpl.JObjectImpl.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\StringBuffer.d(291): function dejavu.lang.StringBuffer.StringBuffer.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\AbstractStringBuilder.d(263): function dejavu.lang.AbstractStringBuilder.AbstractStringBuilder.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\StringBuilder.d(208): function dejavu.lang.StringBuilder.StringBuilder.toString of type String() overrides but is not covariantwith object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\io\File.d(198): function dejavu.io.File.File.toStringof type String() overrides but is not covariant with object.Object.toString oftype char[]()
..\..\..\src\dejavu\dejavu\lang\Throwable.d(50): function dejavu.lang.Throwable.Throwable.toString of type String() overrides but is not covariant with object.Exception.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\String.d(484): function dejavu.lang.String.String.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Byte.d(98): function dejavu.lang.Byte.Byte.toString of type String() overrides but is not covariant with object.Object.toStringof type char[]()
..\..\..\src\dejavu\dejavu\lang\Boolean.d(52): function dejavu.lang.Boolean.Boolean.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Integer.d(107): function dejavu.lang.Integer.Integer.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Long.d(118): function dejavu.lang.Long.Long.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Float.d(84): function dejavu.lang.Float.Float.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Double.d(81): function dejavu.lang.Double.Double.toString of type String() overrides but is not covariant with object.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Character.d(107): function dejavu.lang.Character.Character.Subset.toString of type String() overrides but is not covariant withobject.Object.toString of type char[]()
..\..\..\src\dejavu\dejavu\lang\Character.d(688): function dejavu.lang.Character.Character.toString of type String() overrides but is not covariant with object.Object.toString of type char[]() |
Any ideas? |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Mon Apr 16, 2007 3:28 am Post subject: |
|
|
First one seems to be tango only issue, because a tango class complains about another tango class.
I took a look into the tango object.di:
Code: | 8 class Object
9 {
10 char[] toUtf8();
11 hash_t toHash();
12 int opCmp(Object o);
13 int opEquals(Object o);
14
15 version( PhobosCompatibility )
16 {
17 alias toUtf8 toString;
18 }
19
20 //final void notifyRegister(void delegate(Object) dg);
21 //final void notifyUnRegister(void delegate(Object) dg);
22 } |
I was not aware of this PhobosCompatibility version. It seems you have this set, and now it is in conflict with JObjectImpl.toString.
Can you try to unset this version? |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Apr 16, 2007 7:45 am Post subject: |
|
|
I can't unset it because I've never set in the first place. I don't even have tango's object.di installed. I just have a tango directory in my import path (i.e. tango-0.97-src\tango from tango-0.97-src.zip). I use phobos and I will not replace it with tango. Even if I wanted (and I don't) I can't because my projects are using phobos. Plus I believe that the intention of tango to replace phobos is the worst idea. Why don't they do it like a normal lib that can coexist with phobos and whoever wants to can use it without having to switch between phobos and tango? I am not sure I fully understand how tango works, but what I do understand is that it is missing most of the phobos functionality.
To make the long version short- is there any other way? |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Mon Apr 16, 2007 10:01 am Post subject: |
|
|
Actually this is a problem, because Java has "String toString()" in Object. This conflicts with the phobos version of Ds object.Object.
I don't think it is possible to define a toString method with other return type, as long as it exists in object.Object.
So I think, actually there is no other way.
In the long run, i will add a refactoring to rename the Java methods to toJString, which will solve the problem. |
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Mon Apr 16, 2007 10:38 am Post subject: |
|
|
bobef wrote: | I can't unset it because I've never set in the first place. I don't even have tango's object.di installed. I just have a tango directory in my import path (i.e. tango-0.97-src\tango from tango-0.97-src.zip). I use phobos and I will not replace it with tango. Even if I wanted (and I don't) I can't because my projects are using phobos. Plus I believe that the intention of tango to replace phobos is the worst idea. Why don't they do it like a normal lib that can coexist with phobos and whoever wants to can use it without having to switch between phobos and tango? I am not sure I fully understand how tango works, but what I do understand is that it is missing most of the phobos functionality.
To make the long version short- is there any other way? |
There is no real intention of replacing Phobos from the Tango team, we just think that Phobos don't cut it. The reason there are conflicts is that Tango in several places has needed to improve upon the runtime part of Phobos to provide the functionality it does.
The PhobosCompatibility version is there to make it possible to use both API's, something which is handled by using the Tango runtime and a slightly modified Phobos called Tangobos (I think it will get it's own project on dsource soon). The Phobos interface is not changed in Tangobos however. As long as SWT use toString, there will be problems using both however (note that toString actually returning String is the reason for Tango having toUtf8 for char[] returns).
As for Tango missing most of Phobos functionality, that is certainly wrong. The API's are quite different however. There are few features in Phobos not in Tango, but probably many more features in Tango not in Phobos. |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Apr 16, 2007 12:03 pm Post subject: |
|
|
Quote: | As for Tango missing most of Phobos functionality, that is certainly wrong. The API's are quite different however. There are few features in Phobos not in Tango, but probably many more features in Tango not in Phobos. |
Hmm... I probably overlooked Tango because I like Phobos Maybe I should take a deeper look when I have the time. |
|
Back to top |
|
|
|