guix-devel
[Top][All Lists]
Advanced

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

Re: Transformations Shell Syntax


From: John Kehayias
Subject: Re: Transformations Shell Syntax
Date: Sat, 27 May 2023 17:07:00 +0000

Hello,

As one who also would like a shorter syntax option, here's a quick thought: what about a short version of what we have for when there is only one package given or it can be applied to all packages/be a positional argument? An example is perhaps best, so what if we could write:

guix shell <package> --with-latest

or guix shell <package> -<a letter which is available>

which is short for

guix shell <package> --with-latest=<package>

or even

guix shell <package1> <package2> <package3> --with-latest

to apply to all packages.

Or something like

guix shell <package1> <package2> --with-git-url="" git url for package3> <package3>

and so on.

A positional argument requires a bit more work and signaling/knowledge for the user, but maybe just the short hand --with-latest or -x (or whatever letter) which errors when more than one package is given is a step in this direction. Not sure if these two related suggestions can be combined or not without making things too complex.

Anyway, it would be nice to have a short version for, at least for me, the common situation of trying to build a single package with a transformation(s) for just that one. For instance, that's usually how I check if there's trivial version bump or if building from some fork works without modification of the package definition beyond the source.

(apologies for the top post and formatting, currently away from a proper computer)

John

-------- Original Message --------
On May 26, 2023, 10:50 PM, Ludovic Courtès < ludo@gnu.org> wrote:

Hello! "jgart" skribis: > Uses specified commit hash: > > guix build emacs-ement@8b56efa9387262514daf63151d41c9e111e79567 > > Uses specified commit hash (short): > > guix build emacs-ement@8b56efa > > Uses latest upstream release: > > guix build emacs-ement@latest > > Uses upstream version 0.8.2 if not packaged: > > guix build emacs-ement@0.8.2 > > Uses the latest commit in the wip/find-room branch: > > guix build emacs-ement@wip/find-room I sympathize with the will to get a more compact way to express transformations. Right now, command-line tools parse package specs by calling ‘specification->package+output’. There are no restrictions on version fields: “8b56efa9387262514daf63151d41c9e111e79567” and “latest” are perfectly valid version fields. Thus, if the syntax above was implemented, we’d introduce ambiguity. Consequently, rather than overload “@”, I believe another syntax would need to be found. Thanks, Ludo’.
reply via email to

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