FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Win32 troubles

 
Post new topic   Reply to topic     Forum Index -> Tioport
View previous topic :: View next topic  
Author Message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Apr 16, 2007 1:45 am    Post subject: Win32 troubles Reply with quote

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
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Mon Apr 16, 2007 3:28 am    Post subject: Reply with quote

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
View user's profile Send private message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Apr 16, 2007 7:45 am    Post subject: Reply with quote

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? Smile
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Mon Apr 16, 2007 10:01 am    Post subject: Reply with quote

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
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Mon Apr 16, 2007 10:38 am    Post subject: Reply with quote

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? Smile


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
View user's profile Send private message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Apr 16, 2007 12:03 pm    Post subject: Reply with quote

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 Smile Maybe I should take a deeper look when I have the time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tioport All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group