rdmd

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jul 5 20:21:56 PDT 2009


Adam D. Ruppe wrote:
> On Sun, Jul 05, 2009 at 08:40:01PM -0500, Andrei Alexandrescu wrote:
>> I suspect link.exe has trouble with that long path including the oddly 
>> named \.rdmd\ in there. Could you please could paste the dmd invocation 
>> command in your prompt and then progressively simplifying the path names 
>> until you get something that works?
> 
> Yeah, that's the area. I think I got it.
> link apparently doesn't like the dots in the output filename.
> 
> dmd  -of"C:\Users\me\AppData\Local\Temp\.rdmd\hello.d.ED85692521C0A87990BB1B70BEE0046C.exe" -od"C:\Users\me\AppData\Local\Temp\.rdmd\rdmd-hello.d-ED85692521C0A87990BB1B70BEE0046C" "hello.d"
> 
> This fails with the weird error.
> 
> dmd  -of"C:\Users\me\AppData\Local\Temp\.rdmd\hello-d-ED85692521C0A87990BB1B70BEE0046C.exe" -od"C:\Users\me\AppData\Local\Temp\.rdmd\rdmd-hello.d-ED85692521C0A87990BB1B70BEE0046C" "hello.d"
> 
> This works!
> 
> The dot in the .rdmd is ok, but not the ones in the actual filename.
> 
> 
> Simple fix for this: rdmd.d line 160 and 161 can be changed to:
> 
>             exe = join(myOwnTmpDir, std.string.replace(root, ".", "-"))
>                 ~ '-' ~ hash(root, compilerFlags);
> 
> 
> And then it works.

Great, incorporated your fix and checked it in.

> Let me try it with a slightly less trivial program. Uh oh. Actually, no...
> that's a bug in my program. But it didn't give an error message.
> 
> In getDependencies(), if depsExitCode !=0, it should probably print some
> kind of message explaining why it is exiting. (In my case, it was a typo
> in the program causing a compile error.) The last few lines of dmd's
> output would probably be a good choice.

Oh, indeed. In fact I'll print the entire file, at least for now:

     if (depsExitCode)
     {
         if (exists(depsFilename))
         {
             stderr.writeln(readText(depsFilename));
         }
         exit(depsExitCode);
     }

> But then, I fix my stupid bug, and it works!
> 
> 
> Yay, I think we did it.

Awesome, thanks. I credited you in rdmd.d.

>> I think that would be absolutely great, but only if it's absolutely no 
>> hassle for you to set up. 
> 
> None at all. I'll email you tomorrow night with the info.
> 
>> By the way, does Windows Server 2003 offer 
>> some command-line access (a la ssh) in addition to rdesktop (which is 
>> indeed very nice)? Command-line access would allow me to automate builds 
>> and tests.
> 
> Yes. Windows has a telnet server built in that I can turn on 
[snip]
> Pretty fun stuff. This same functionality will basically work on 2k3 too.

Fun indeed. Thank you.


Andrei



More information about the Digitalmars-d mailing list