Subject: Re: [bug#74961] [PATCH] scripts: deploy: Add the expression command line flag.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 23 Dec 2024 18:46:41 +0100

Richard Sent <[email-masked]> skribis:

> * guix/scripts/deploy.scm (show-help): Add help.
> (%options): Add -e and --expression.
> (guix-deploy): Use expression and check for invalid flag combinations.
>
> Change-Id: I200c9ff0c9a8c686efff4a21cd33c10429f3c73e

Applied.

> Submitting a patch to take care of https://issues.guix.gnu.org/71841.
> Always struck me as odd that deploy doesn't have a --evaluate flag
> like many others, so here's a go at it.
>
> I didn't update documentation because "invoking guix deploy" still has
> a TODO stating
>
>> @c FIXME/TODO: Separate the API doc from the CLI doc.
>
> As is there doesn't seem to be a good place to insert --expression
> documentation without sidetracking the info page.

Yeah.  We should probably move the first half of the existing material
in a “Getting Started” subsection, the second half in the “Defining
Machines” subsection, and then insert an “Invoking guix deploy”
subsection with the CLI reference somewhere.  Food for thought.  :-)

[...]

> +           (expression (assoc-ref opts 'expression))

As a followup, it would be nice to have an ‘ensure-machine-list’ or
something, similar to how (guix scripts build) has ‘ensure-manifest’ &
co. to validate its arguments.

Thanks,
Ludo’.