Prototype buildsystem "Drake"

Jacob Carlborg doob at me.com
Thu Jul 14 12:50:23 PDT 2011


On 2011-07-14 00:32, Ulrik Mikaelsson wrote
> Not trying to be argumentative, but what exactly do you see as the
> gains in having a D-buildtool built in D (or D-specific build-tool in
> any language, for that matter)? Seriously, I'm really asking, since
> I'm having a hard time seeing it? Personally, I can only see the
> drawbacks;
>
>   * Building druntime and phobos might be difficult with a d-based buildtool
>   * The build-tool itself will need bootstrapping. A user that wants to
> test some D-project, will first have to aquire (build) and install
> some D-compiler with custom tools. Then install druntime with another
> custom build-system. Then Phobos. Then drake. And THEN, the
> application/library he/she was interested in. Shortening this path is
> IMHO REALLY important to see more D adoption. From my personal
> experience, convincing developers and testers to fight through this
> path is HARD.

The build tool should provide pre-compiled binaries on all supported 
platforms. Then the build tool should provide a build script for it 
self, so the build tool can build it self.

>   * Cross-language builds (project with bindings), and builds with
> external targets might be more difficult than need be, if the "2nd"
> language is not supported by drake.

You can offer to run system commands.

>   * Verbose build-script is IMHO a _really_ undesireable trait.

I agree with this.

>   * How soon will I as a developer be able to "just build" a D-binding
> to a C++-app (with needed C-glue-code) in Drake? Will a user of, say
> Gentoo, be able to count on this working in his/her envrironment too?
>   * Non-compilation actions will have to be reimplemented; document
> generation, test execution, install-tasks following OS-specific
> install procedures (XDG-guidelines etc.), ...

Yes, this is preferable to have.

> IMHO, it sounds like a case of the NIH-syndrome, but I might be
> missing something obvious?

In my experience other build tools aren't good enough in at least:

1. Making it as easy as it could be to build simple executables and 
libraries

2. Syntax is not as good/clean as it could be

1. Is because they don't know about D and D compilers.
2. I don't know about this one. This is an example of a Rubygems file:

spec = Gem::Specification.new do |s|
   s.name = 'example'
   s.version = '1.0'
   s.summary = 'Example gem specification'
end

Even this tool, which uses Ruby, has unnecessary noise in the syntax. 
This could instead be written as:

gem do
   name 'example'
   version '1.0'
   summary 'Example gem specification'
end

In this case the Ruby syntax doesn't allow to use the equal sign, like 
this: "name = 'example'".

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list