Dub support was added to Meson

Russel Winder russel at winder.org.uk
Wed Aug 15 09:31:48 UTC 2018


On Tue, 2018-08-14 at 17:51 +0000, Filipe Laíns via Digitalmars-d-announce
wrote:
[…]
> 
> Yeah, Meson is a build system, not a package manager. This 
> problem can be solved by simply creating a script that fetches 
> and builds de dependencies. When creating a script, you might 
> also want to compile the dependencies against the system's 
> default D compiler. This way, you won't have any issues.

That's the battle isn't it. Should the system that builds be the system that
also manages the packages for the build (cf. Dub, Cargo, Go, Mason), or should
the two be kept separate (cf. CMake, Meson, SCons, Make).

The debate has been had on the D mailing lists a number of times and at great
length. But in the end D, Rust, and Go are going with a single system for
everything.

Building for Debian/Fedora/etc. can be seen as separate from building a
project independent of platform. Whilst build-only clearly works for
Debian/Fedora/etc. builds, and possibly for big corporate builds, for small
projects the all-in-one approach is clearly winning the battle for hearts and
minds.  

[…]
> It uses 'dub describe' to find the files, this also allows us to 
> check the compiler. Meson won't even let you try to compile the 
> project if there's an compiler mismatch.

I am not sure how "dub describe" tells you which compiler is being used, it
always says "compiler": "dmd" on my projects even though I only use ldc2 for
build.

[…]
> I mean, you can do this but as you said, it's not recommended.

Certainly it is not recommended for Meson builds but I see no reason why. It
is just duplicating information that is held on the filestore, and DRY is
supposed to be a thing in computing. Convention over configuration really
makes things a lot easier. But I guess this debate would turn into a flame war
of competing prejudices, so probably best left alone. 

[…]
> Dub is implemented this way for a reason. We really *shouldn't* 
> use dynamic libraries, at least for now.

Maybe then Dub should be better able to handle shared objects. Whilst the
whole static linking vs. shared objects is another topic that descends into
flame wars of prejudice, the de facto standard tool should not really be
taking sides in the war but should support both sides. Dub supports shared
objects as dependencies, but just fails to be able to build them.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- 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-announce/attachments/20180815/d5b15a0b/attachment.sig>


More information about the Digitalmars-d-announce mailing list