Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Tango with D2.0?

Moderators: larsivi kris

Posted: 10/23/08 05:21:53

Is there any way to compile Tango for D2.0? Are there any versions that support this?

I'm running Ubuntu 8.04, using DMD 2.019.

I tried issuing dsss net install tango, which proceeds to checkout a copy of Tango into my /tmp folder, tries to compile, and then starts to spudder:

Exported revision 937.
tangocore

You have chosen to install Tango via DSSS. If you follow through, you
will no longer be able to build Phobos-based software. Uninstalling
tango via DSSS WILL NOT uninstall the tango core, so this operation
is difficult to undo. Are you sure you want to do this?
yes
Building Tango core...
 * snipped *
make[1]: Leaving directory `/tmp/DSSS_tango/tango/tango/lib/gc/basic'
make -C ./common/tango -fposix.mak lib DC=dmd ADD_DFLAGS="" ADD_CFLAGS="-m32"
make[1]: Entering directory `/tmp/DSSS_tango/tango/tango/lib/common/tango'
dmd -c -release -O -inline -w -nofloat -version=Posix  -Hfcore/BitManip.di core/BitManip.d -ofcore/BitManip.o
/tmp/DSSS_tango/tango/tango/lib/../object.di(172): function object.Exception.toString overrides base class function object.Object.toString, but is not marked with 'override'
make[1]: *** [core/BitManip.o] Error 1
make[1]: Leaving directory `/tmp/DSSS_tango/tango/tango/lib/common/tango'
make: *** [lib] Error 2
=
= *** Error ***
=
Command bash returned with code 256, aborting.

Also went to the trunk on DSource, downloaded a zip file of r4034 (didn't feel like messing around with SVN for the moment), and then unzipped it to /tmp/tango-trunk. Issued dsss build in that directory, but these errors raced to my terminal:

Creating imports for DD-tango-core

Creating imports for DD-tango-io

Creating imports for DD-tango-math

Creating imports for DD-tango-net

Creating imports for DD-tango-stdc

Creating imports for DD-tango-sys

Creating imports for DD-tango-sys-linux

Creating imports for DD-tango-text

Creating imports for DD-tango-text-locale

Creating imports for DD-tango-util

Creating imports for DD-tango-time

tango/core => DD-tango-core
lib/common/tango/core/Exception.d(66): constructor object.Exception.this (char[] msg, Exception next = cast(Exception)null) does not match parameter types (invariant(char[24u]),char[],uint)
lib/common/tango/core/Exception.d(66): Error: cannot implicitly convert expression ("Memory allocation failed") of type invariant(char[24u]) to char[]
lib/common/tango/core/Exception.d(71): Error: cannot implicitly convert expression (this.msg ? super.toString() : "Memory allocation failed") of type const(char)[] to char[]
lib/common/tango/core/Exception.d(94): constructor object.Exception.this (char[] msg, Exception next = cast(Exception)null) does not match parameter types (invariant(char[17u]),char[],uint)
lib/common/tango/core/Exception.d(94): Error: cannot implicitly convert expression ("Assertion failure") of type invariant(char[17u]) to char[]
lib/common/tango/core/Exception.d(111): constructor object.Exception.this (char[] msg, Exception next = cast(Exception)null) does not match parameter types (invariant(char[25u]),char[],uint)
lib/common/tango/core/Exception.d(111): Error: cannot implicitly convert expression ("Array index out of bounds") of type invariant(char[25u]) to char[]
lib/common/tango/core/Exception.d(125): constructor object.Exception.this (char[] msg, Exception next = cast(Exception)null) does not match parameter types (invariant(char[18u]),Exception)
lib/common/tango/core/Exception.d(125): Error: cannot implicitly convert expression ("Finalization error") of type invariant(char[18u]) to char[]
lib/common/tango/core/Exception.d(125): Error: cannot implicitly convert expression (e) of type object.Exception to char[]
lib/common/tango/core/Exception.d(125): Error: expected 4 arguments, not 2
lib/common/tango/core/Exception.d(143): constructor object.Exception.this (char[] msg, Exception next = cast(Exception)null) does not match parameter types (invariant(char[34u]),char[],uint)
lib/common/tango/core/Exception.d(143): Error: cannot implicitly convert expression ("No appropriate switch clause found") of type invariant(char[34u]) to char[]
Command /home/deadimp/lib/dsss/bin/rebuild returned with code 256, aborting.
Error: Command failed, aborting.

The organization for dmd / dsss isn't particularly solid just yet: both are stored in ~/lib, where I've updated my PATH to add their binary directories. I had previously installed the .deb package of DMD 2.014, but uninstalled it after installing 2.019.

Beginning D programmer

Basic experience in PHP, C++, Java, C#, MySQL, HTML, CSS, JavaScript?, VB

Author Message

Posted: 10/23/08 08:18:21

D2.0 is quite far from being officially supported by Tango, but if you still want to try it, you need to check out from a branch in svn:

svn co http://svn.dsource.org/projects/tango/branches/experimental/D2.0

Posted: 03/07/09 11:27:24 -- Modified: 03/07/09 11:29:11 by
CLXX -- Modified 2 Times

changes:
char[] => Mutf8 (mutable utf8-string)
wchar[] => Mutf16 (mutable utf16-string)
const(char)[] => Cutf8 (const utf8-string)
If you need Mutf8 from Cutf8, cast(Cutf8) or .dup is available.

Posted: 05/27/09 11:34:38

Hi. I try to compile Tango from there "svn co http://svn.dsource.org/projects/tango/branches/experimental/D2.0" with D2.030. When i compile tango-user lib, I have some error. For example,

tango/io/device/Conduit.d(155): Error: function tango.io.device.Conduit.Conduit.output does not override any function tango/io/device/Conduit.d(166): Error: function tango.io.device.Conduit.Conduit.error does not override any function tango/io/device/Device.d(232): Error: function tango.io.device.Device.Device.write does not override any function

It is some particular of D2?

I'm from Russia, so I'm sorry for my English.

Posted: 05/27/09 16:35:12

The D2 branch is currently somewhat out of date, and I'm pretty sure it is not compatible with such a late compiler.

The errors are probably due to a stricter compiler that rejects earlier Tango code (I think the same stuff was fixed in trunk at some point after the last merge to the D2 branch).

Posted: 12/03/09 14:48:58

I was wondering are there still serious stoppers for Tango on D2? The last time I checked there were some serious runtime discussion but that was a long time ago. But the d2 branch doesn't seem any newer. Is there any progress? Any bugs or something I can vote for to make tango for d2 possible?

Posted: 12/04/09 03:58:26

one problem is the lack of flexibility with const ... as I understand it, this means tango.text.Util would need three variations for every function

Posted: 12/04/09 09:56:54

Rewrite the text function is not difficult, although a long time. I with Dervinar have already done half a year ago. Then there is a problem in the fact that we should "make friends" with tango druntime, and without druntime in dmd > 2.019 we have some troubles. What is with gcx.

Sorry for my bad English...

Posted: 12/06/09 13:43:16

kris wrote:

one problem is the lack of flexibility with const ... as I understand it, this means tango.text.Util would need three variations for every function

Can't templates be used? Or else what flexibility you need exactly, so I can moan a little bit about it in the D newsgroup :)

Posted: 07/01/10 20:23:50

Hate to dig up an old thread, and I know the topic seems to have been discussed to death, but I can't find anything on long term plans. I've been out of the D game for a while, and I want to get back in but feel a new version of D is worthless without a new version of Tango.

Are the core developers not planning to move to D2 after it's been finalized? Another thread implied most were content to stay with D1 permanently. I fear this will essentially fork D, stuck with either a primitive standard library or an outdated language/compiler set.

With D2 and Tango being mutually exclusive, I hope they don't both fade away :(

Posted: 07/06/10 02:49:25

anyone/everyone is welcome to revise the D2 branch in order to make it current ... hint hint :)

Posted: 07/10/10 22:13:40

I wouldn't mind giving a hand in a D2 update, but if it's true most of the core developers have no intention of using/supporting it, it'd be a fork at best and a constant uphill battle at worst. Without any current attachment, I think most new (and returning) users would sigh with disappointment and move on

Posted: 07/17/10 20:27:00

if the differences were fairly manageable I don't see a reason why it wouldn't be officially supported. The issue is simply that the core-devs find themselves with not a whole lot of time to expend on creating a D2 variant.

Posted: 07/17/10 20:29:48

bobef wrote:
kris wrote:

one problem is the lack of flexibility with const ... as I understand it, this means tango.text.Util would need three variations for every function

Can't templates be used? Or else what flexibility you need exactly, so I can moan a little bit about it in the D newsgroup :)

The functions in there already are templates :)

If you can get them to work cleanly on D2 without multiple copies everywhere, that would be a big problem out of the way. perhaps try using util.d with D2, and see how far you get?

Posted: 07/19/10 16:36:28

Isn't inout supposed to solve that problem? If you declare a function like this:

inout(int)[] foo(inout(int)[] a, int x, int y)
{
    return a[x .. y];
}

Then you can call the function with mutable, const or immutable values and it will also be transferred to the return value.