[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GWL as a build-automation

From: Ricardo Wurmus
Subject: Re: GWL as a build-automation
Date: Mon, 06 Jun 2022 10:50:26 +0200
User-agent: mu4e 1.6.10; emacs 28.1

Hi Olivier,

> So I'm thinking, one could easily do something like this for a simple
> Guile project:
> process compile-guile-source (with dot-scm)
>   package "guile"
>   inputs  : file dot-scm
>   outputs : file : string-replace-substring dot-scm ".scm" ".go"
>   # {
>     guild compile --output {{outputs}} {{inputs}}
>   }
> And this could also be done for other projects, e.g.:
> process compile-c-source (with dot-c)
>   package "gcc-toolchain"
>   inputs  : file dot-c
>   outputs : file : string-replace-substring dot-c ".c" ".o"
>   # {
>     gcc -c -o {{outputs}} {{inputs}}
>   }

It is not entirely surprising to me that the GWL can express this,
because it has really simple abstractions: that of a process and that of
a workflow consisting of processes.

What I do find a little surprising, though, is that there is an apparent
need for declaring processes like this.  The Scheme Shell (scsh), for
example, takes on a similar problem, but the abstraction is different;
less focused on inputs and outputs and instead more geared to
integrating Shell script idioms with plain Scheme.

Personally, I find the GWL too complex for mere process abstractions and
lacking in features that are common in Shell scripts.  Notably, it punts
on improving the syntax of the command; it shrugs and just uses a string
to express the whole command (with a little variable interpolation).

Perhaps there is space for a different tool that takes lessons from the
GWL and Scsh alike, with a focus on command composition and shell
abstractions.  Perhaps that tool already exists and is called Metabash:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]