SCons support for D

Russel Winder russel at russel.org.uk
Wed Dec 7 01:54:08 PST 2011


On Wed, 2011-12-07 at 20:27 +1100, Andrew Gough wrote:
[...]
> I think the build tool question is in need of the same level of high
> level design and support that Steve Teale is working on for
> std.database/std.sql.

I am not sure I quite get that, sorry.

> It seems there is SCons support (python), CMake, Orbit (Ruby), DSSS
> (D1 only?), xfbuild, dake, rdmd options - I've added preliminary D
> support to premake.

As far as I am aware the C, C++, Fortran communities use Make,
Autotools, SCons, CMake or Waf.  I suspect they have never heard of
DSSS, xfbuild, dake or rdmd ;-)

> Would it be a good idea to thrash out the arguments for/against a
> particular tool, and build/support just one?  The community doesn't
> seem big enough to be so fragmented.  Java has Ant, Scala has sbt  -
> surely D should have a canonical build tool?

I use SCons for much of my builds of LaTeX, C, C++, Fortran, Haskell, D,
OCaml, etc.  It works nicely for multi-target, multi-platform builds.  I
use Waf for "ship the source, compile on installation" FOSS projects.  I
have given up on Autotools.  CMake's language is dreadful so I only use
that if necessary.

Java has Gradle, Maven, Gant, and Ant.  Using Ant for builds is like
using assembly language to create GUI applications -- possible but not
recommended.

Scala has sbt because the Scala community couldn't abide the
multi-languages approach, everything has to be Scala.  Clojure has a
similar philosophy and hence Leiningen.

Sure D can use D as the build specification language and follow the
inward looking Scala and Clojure approaches of creating a new tool for
build.  But that is just trying to create a closed system.  Is this
closed approach really what the D community wants to do -- is following
the Scala and Clojure philosophy desirable?

The advantage of Gradle and Maven as build tools for JVM based systems
is that you can write multi-lingual systems and build them.  Java,
Scala, Groovy, JRuby, Clojure -- all can be used in a single system.
sbt has problems with this since it assumes all source is Scala (more or
less).  The Java community is rapidly giving up its "Java is all you
need" attitude and is looking positively at the polyglot approach.

D sits in a context of C, C++, Fortran (possible others?) which means
something like SCons, Waf and CMake which has support for all these
already baked in seems like a "less work" way forward.

So the strategy is one of:

Do we work with a build framework that exists and already allows serious
build using D; or

do we start from scratch with a new build framework that no-one can use
till something is ready?
 
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111207/be7d4441/attachment-0001.pgp>


More information about the Digitalmars-d mailing list