dub: JSON, SDL, YAML, TOML, what color should we paint it ?

H. S. Teoh hsteoh at qfbox.info
Tue Feb 28 16:56:24 UTC 2023


On Tue, Feb 28, 2023 at 04:32:42PM +0000, Adam D Ruppe via Digitalmars-d 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.

Hmm.  Now THIS is an awesome idea.  Instead of having a separate build
description apart from the code, inspect the code itself to figure out
how to build it.  With the help of UDAs and other such annotations to
help things along.  This is definitely a direction worth exploring!


T

-- 
When you breathe, you inspire. When you don't, you expire. -- The Weekly Reader


More information about the Digitalmars-d mailing list