On Sat, 27 Apr 2013 17:46:41 GMT, Sönke Ludwig wrote:

On Fri, 19 Apr 2013 12:26:04 GMT, Robert wrote:

Hi there!

I've patched dmd to output more complete dependency information, than it does now:

https://github.com/D-Programming-Language/dmd/pull/1839

Maybe you could have a look and comment whether you like it or what you don't like about it, so I can improve it. I hope that this pull won't rot like so many dmd pull requests, but will get merged soon. I think some discussion on the pull could help, because it signals to dmd maintainers that people care about this pull.

Yeah, it's really a pity how much work (at least seems to) get lost for DMD and its satellite projects because the response time sometimes is so high and things get out of date until the author is not willing to fix it up anymore...

My thoughts regarding the dependency output

  1. I like it and it seems to be the clean alternative to using the -v output, as rdmd does. Ideally, the format specification would appear at an official place so that other compilers can also adopt it.

Would definitely be a good thing.

  1. Isn't the "deps" prefix for each line redundant? (i.e. wouldn't "import", "file", etc. suffice?)

Not really, because the output goes through stdout, depending on other switches (e.g. -v) there might be other output, with the "deps" prefix it is easy to filter the relevant information.

  1. I still very much favor the idea of letting dmd itself gather dependencies while it compiles, rather than performing an initial dummy build

I had the latter in mind, so dub initially just builds everything and tracks the dependencies while doing this, so on a change only relevant files would be recompiled.

(but this is of course still useful for change tracking as soon as partial compilation works correctly - I've seen you and Dicebot have been quite busy to fix that...)

Glad you noticed ;-), I just wanted to get the dependency output right for templates and patched the compiler so the needed information is available. Dicebot pointed out that with this information the linking errors due to incremental/all-at-once could also be fixed. The roadmap is to get the -deps switch in, then fix it together with the -deps=filename switch, then fix the linking errors, if Dicebot hasn't done it already. In the meantime, (the next 2 years or so :-( ), I'll hack on dub.

Hm... I just noticed that Andrej Mitrovic has already made a pull request for built-in recursive builds: https://github.com/D-Programming-Language/dmd/pull/1861

Yep, but the -deps output is still needed for avoiding needless builds.

Best regards,
Robert

P.S.: Sorry about no patches yet for library building, my girlfriend and I decided spontaneously to go on vacation for a few days, so I haven't done anything yet. I also have an exam to learn for, so it might take a while, but I am on it.