[gsoc] DMD - Ideas

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Mar 19 17:01:43 UTC 2019


On Thu, Mar 14, 2019 at 12:16:26AM +0000, Mike Franklin via Digitalmars-d wrote:
[...]
> There is currently an unfinished project in the DMD repository that is
> intended to replace all makefiles with a script written in D [1].  It
> was started by Seb [2] (Thanks! Seb) and I tried to move it along [3].

Finally!


> There are a number of reasons for doing this.
> 
> 1. The current build system relies on Posix-y and Nix-y tooling to
> work.  Much of that tooling is not available by default on Windows, so
> a number of 3rd party dependencies need to be installed first to get a
> build on Windows.  This increases the barrier to entry for those
> wishing to contribute to D or build one's own compiler.

Yes, that is rather annoying. (Not that I'd know, though, since I don't
use Windows.)


> 2. The build system is difficult to understand, further heightening
> the barrier to entry.  The one thing all contributors to D have in
> common is the D language itself.  It will be much easier to understand
> and debug a build system written in D than one written with makefiles.

That depends on how well-written the build system is. :-P  As somebody
once said, "you can write assembly code in *any* language..."


> 3. Why in the world do we work so hard building extremely powerful
> programming languages like D to automate our lives, and then resort to
> inferior tools like makefiles to build our software? rdmd makes
> scripting in D easy an convenient.

This has come up many times before, with the usual response being Andrei
saying that nothing stands out among the large crowd of makefile
alternatives.  Has this stance changed since?


> build.d currently works for Linux, but it needs more work for Windows.
> It's almost there; it just needs a little more work.
> 
> It currently mimics the makefiles, as it was ported from them, but I
> believe that once build.d is working, it can be refactored to
> something more idiomatic-D that all proficient D users can easily
> understand and debug.
[...]

OK, some questions.

1) Why not use an existing build system written in D?  There's Button,
Atila's build tool (sorry forgot what it was called), Dub (ick - sorry),
etc..

2) Won't there be bootstrapping issues to consider, if building dmd
requires build.d, but build.d needs to be compiled with dmd?


T

-- 
Valentine's Day: an occasion for florists to reach into the wallets of nominal lovers in dire need of being reminded to profess their hypothetical love for their long-forgotten.


More information about the Digitalmars-d mailing list