dub: JSON, SDL, YAML, TOML, what color should we paint it ?
Mathias LANG
geod24 at gmail.com
Wed Mar 1 10:26:49 UTC 2023
On Tuesday, 28 February 2023 at 16:32:42 UTC, Adam D Ruppe wrote:
> On Tuesday, 28 February 2023 at 16:10:19 UTC, Steven
> Schveighoffer wrote:
>> module buildfile;
>
> This isn't what I'm talking about at all.
>
> I don't want to run D to build, I want to *introspect* D for
> build info. You can read module names, dependencies (including
> platform-specific and configuration-specific ones) right out of
> D code. Author, description, license, etc., have standard ddoc
> sections in D code.
>
> Other things dub.json define like flags could easily be a UDA
> on the module declaration and be pulled out pretty easily by
> compilers or even relatively basic parsers.
>
> Even subconfigurations can... kinda be pulled out of D code by
> looking for version blocks though that's probably another thing
> I'd put on a UDA.
On paper it sounds quite good, but I am not sure how well it
works to derive the build instructions from the thing you are
trying to build. Most of the time, when I build something, it
fails. It's quite obvious why: Build something new, it will fail
for a reason or another. Fix it, rebuild, and it either pass, or
you discover another error. Things do succeed on the first try on
some occasions, but the number of time they don't is much higher.
How do you ensure your build system is resilient in the presence
of wrong modules ? How do you ensure that build system errors are
not replaced by linker / compilation errors ?
More information about the Digitalmars-d
mailing list