[Scons-dev] D support, not sure what to do

Jean-Baptiste Lab jeanbaptiste.lab at gmail.com
Fri Apr 7 15:51:09 EDT 2017


Hi list,

This is mainly directed at Russell, but I hope he and I are not the only one willing to build D code with SCons.
I have a pet project of mine[1], mainly to scratch 2 itches:
- learning D
- helping me with managing my time

I started using dub as the build system for it but started quickly spending a lot of time fighting with it to get it to do things I expected it to be able to do (installing stuff, integrating with system dependencies, handling translations, etc) instead of actually coding the thing. I even submitted patches.
Eventually, I acknowledge that dub  wasn't either quite there yet or simply that I was using the wrong wrench to nail that thing (?).
Anyway, what I ended up doing (which I must admit is pretty much what I always end up doing) was going with SCons which doesn't quite do what I want, but most of the time is halfway there because of its flexibility.
 I implemented a few wrappers and utilities around the D builders in SCons [2] (unit test builder,  ddoc builder, etc) and am now up to a point where I think they're worth sharing, at least with you guys.

I am willing to help with D support in SCons as I hope this would attract more people to both D and SCons (the best combo if you ask me), but I don't have much time, a situation many of you I'm sure are familiar with😉

I'm writing this on my phone while waiting for my kids to fall asleep, I'll try to elaborate a bit more tomorrow....

[1] https://bitbucket.org/jbl/ttracker
[2] https://bitbucket.org/jbl/site_scons

On 7 April 2017 20:52:48 CEST, Bill Deegan <bill at baddogconsulting.com> wrote:
>Russel,
>
>I had to google a bunch of things below.
>
>Basically, if I understand correctly, your question is should SCons
>support
>downloading and building packages (registered or not with some central
>repo) for various languages?
>
>Is that the gist?
>
>-Bill
>
>On Fri, Apr 7, 2017 at 1:47 PM, Russel Winder <russel at winder.org.uk>
>wrote:
>
>> Hi,
>>
>> The current D support in SCons is really there to support mixed D and
>> C++ software rather than being the best way of handling solely D
>codes.
>> Also SCons focuses on the build case where all the source is in the
>> project and all dependencies are available natively on the platform.
>>
>> Like Rust, and Go, and indeed C++ now with Conan, D has the concept
>of
>> getting packages from a central repository. Rust has Cargo which is a
>> package and build manager, no need for SCons. Go has the go command
>for
>> getting Git/Mercurial/Bazaar packages and building things, no need
>for
>> SCons. D has Dub which like Rust's Cargi is a package management and
>> build system. Scons is really a C and C++ system (*), with support
>for
>> Fortran and D in polyglot systems. Conan must change the game: SCons
>> must support Conan.
>>
>> In some sense Dub removes the need for SCons with D programming. Yet
>> people are using SCons and Meson for building D.
>>
>> For SCons to remain relevant to D, and there is good reasons to do
>> this, it must be able to interwork with Dub to handle getting
>> dependencies from the Dub repository. I am currently "fighting" with
>> trying to make SCons build D codes with Unit-Threaded test framework
>> use. I have to admit I am beginning to wonder why. :-(
>>
>> Which leads to a second issue. D, like Chapel, is beginning to focus
>on
>> compiling all source at once into a target. None of this compile each
>> module/file/… separately and then link. Meson cannot cope with this
>> from what I can see, which  make me wonder if this new replacement
>for
>> Autotools has built in obsolescence.
>>
>> Chapel and D can both be build file/module by file/module, but
>> optimisation works best on all source at once mode. The Chapel folk
>are
>> looking at a Cargo style build system, D has Dub. Is it worth
>pursuing
>> this model in SCons, or is it a waste of effort to try?
>>
>>
>>
>> (*) And obviously XeLaTex, which is now my main use of SCons.
>>
>> --
>> 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
>> _______________________________________________
>> Scons-dev mailing list
>> Scons-dev at scons.org
>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>
>>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170407/274ffe69/attachment.html>


More information about the Scons-dev mailing list