[phobos] rdmd is not compiling
Lars Tandle Kyllingstad
lars at kyllingen.net
Thu Aug 18 01:49:40 PDT 2011
On Thu, 2011-08-18 at 07:37 +0200, Lars Tandle Kyllingstad wrote:
> On Wed, 2011-08-17 at 22:15 +0000, Jonathan M Davis wrote:
> > On Wednesday, August 17, 2011 14:25 Lars Tandle Kyllingstad wrote:
> > > There are a lot of things wrong with rdmd.d in the "tools" repository
> > > right now. If I run "dmd rdmd.d", I get the following error:
> > >
> > > rdmd.d(313): Error: incompatible types for ((& shellQuote) ?
> > > (__funcliteral4)): 'string function(string arg)' and 'string
> > > function(string s) pure nothrow @safe'
> > >
> > > That's easy to fix; just mark shellQuote() as @safe pure nothrow. But
> > > now, the compiler is saying
> > >
> > > rdmd.d(321): Error: undefined identifier myModules
> > >
> > > I think a few of the recent commits need to be reverted.
> >
> > Commits to what? rdmd? dmd? Phobos?
>
> rdmd. It has seen an unusual amount of development activity lately,
> which is great, but it seems not all commits have been properly tested.
>
> (That said, I actually think the first one is a bug in DMD. I cannot
> see any reason why a "string function(string) pure nothrow @safe"
> shouldn't be implicitly convertible to "string function(string)".)
Argh. It is so broken it's not even funny.
I filed a report for the first bug (6524) and implemented the
workaround. Then I fixed the second bug by replacing myModules with
myDeps in line 321. That made it compile, but now another bug has
surfaced:
In the .rsp file, which is supposed to contain DMD's command line
parameters (when there are many of them), the string
"dmd /path/to/dmd.conf" now appears.
I've traced this back to rdmd.d line 414-437, in which the
"binary" (i.e. dmd) and "config" (i.e. dmd.conf) lines of the .deps file
get added as dependencies of the program being compiled. In other
words, it appears to be very much intentional. I have no idea why,
though.
I have submitted a pull request that hopefully fixes these issues in an
acceptable manner. I don't have much experience with the rdmd code,
however, so it should be reviewed by someone who does.
-Lars
More information about the phobos
mailing list