Current RDMD, please?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Aug 17 12:08:45 PDT 2010


On 08/17/2010 01:34 PM, Nick Sabalausky wrote:
> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org>  wrote in message
> news:i4cq4p$7jv$3 at digitalmars.com...
>> Nick Sabalausky wrote:
>>> The RDMD included with DMD is still 20090902, which is two revisions
>>> out-of-date.
>>>
>>> The lack of the fix in r1315 ("Made relative paths searched from the main
>>> file, not the current dir") is a breaker for using RDMD with my projects,
>>> which is particularly bad since xfbuild (my other go-to build tool) seems
>>> to have become incompatible with newer D2s (Ie, certain basic things that
>>> work with newer DMDs get choked on by xfbuild). I know I can compile the
>>> latest RDMD myself, but anyone else compiling my stuff (or using my
>>> stbuild tool) has to do the same.
>>>
>>> So can we please get the current RDMD included with the next DMD
>>> (particularly D2) release?
>>>
>>> This has been brought up at least a couple times before, and didn't get
>>> any official response. Is there something preventing this from happening
>>> that maybe I could help out on?
>>
>> Walter, could you please update your build scripts to build and include
>> rdmd? It's an important tool. Thanks.
>>
>
> My last post was overly long-winded. Summay:
>
> Is there a particular reason rdmd's (r1400) line #326 is:
>
>      myModules[/*rel2abs*/join(rootDir, moduleSrc)] = moduleObj;
>
> instead of:
>
>      myModules[moduleSrc] = moduleObj;
>
> ...? (ie, rdmd prepends "path to the file with main()" to all of the
> relative paths in the deps file)
>
> The former causes problems for me, but when I change it to the latter all is
> fine for me.

I saw the q, and was still mulling for an answer. I the join 
intentionally, and now I think I remembered why.

The join is needed in the probably rare case when you're running rdmd 
from a different directory from the root module, e.g:

$ pwd
~/foo/bar
$ rdmd ../baz/main.d

In this case, if there's no join with the rootDir, modules will be 
looked up in ~/foo/bar/, which is probably not the right thing.

What is your use case?


Andrei


More information about the Digitalmars-d mailing list