D, SCons, Dub

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 17 23:51:51 PDT 2017


On Mon, 2017-04-17 at 20:56 +0000, Alex via Digitalmars-d wrote:
> On Monday, 17 April 2017 at 17:51:33 UTC, Russel Winder wrote:
> > Just in case anyone gives a ####:
> > 
> > I have submitted a pull request that adds ProgramAllAtOnce
> 
> I have been trying to do the opposite with scons - incremental 
> builds. In c++ the .h and .cpp files allowed the compilation from 
> many edits to be limited to one translation unit.

Per module compilation then linking is the default for the Program
builder in SCons, that is already there and has been for over a decade.

> One thing people are often confused about is whether everything 
> needs to be in the header (or di file).

Uuurrr… there is no separation of header and code in D, just modules.
And packages. SCons currently has no "per package" builder. I guess I
need to add this.

> An influence is that most of the code they see written by skilled 
> language users is libraries like the standard library. These 
> typically benefit little from interfaces files because everything 
> is templates and must be in the header to compile. Hence why 
> boost is mostly headers in c++ land and the D ecosystem 
> encourages all at once / all everytime compilation.
> 
> In a large code base this becomes cumbersome. Changing a unit 
> test should not result in everything recompiling.
> 
> I think there is a difference between library style code and 
> application code. My application code doesn't have templates and 
> can make use of di files. It makes sense that the language 
> developers spend most of their time on library type code, and 
> have been focused on it.
> 
> I just need to work out how to get scons to recognise two targets 
> from one builder properly : the object file and the di file.
> I can add DFLAGs to make a Object builder make the di files too, 
> and the d scanner finds di files where d files are not available, 
> but the build tree dependency from d to di file is missing. Dies 
> anyone know how to do this ?

Currently there is no explicit handling of di files in SCons. If you
can come up with a small project that exhibits the problem you need
solved, I can add it as a test case in the SCons system thereby
creating a need for a fix.

(Tests in SCons for the tools are end-to-end tests, so need a project
exhibiting a problem.)
 
-- 
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 winder.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: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170418/87929ee0/attachment.sig>


More information about the Digitalmars-d mailing list