all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Kehayias <john.kehayias@protonmail.com>
To: ludo@gnu.org, jgart@dismail.de
Cc: guix-devel@gnu.org
Subject: Re: Transformations Shell Syntax
Date: Sat, 27 May 2023 17:07:00 +0000	[thread overview]
Message-ID: <BegPbs0oRPKod3wpIoiVu-N_q0YL-3oIIb-VxotmjX5qMFZ7WgOd2oVcENndv0zzih5RAZvitF890OzbYSDuZscfsCfCUwNvCJr5Gi73ETU=@protonmail.com> (raw)
In-Reply-To: <87edn3jdn4.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2467 bytes --]

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=<a 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 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’.

[-- Attachment #2: Type: text/html, Size: 2764 bytes --]

  reply	other threads:[~2023-05-27 17:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23  6:43 Transformations Shell Syntax jgart
2023-05-23  8:16 ` Efraim Flashner
2023-05-23  9:39 ` Simon Tournier
2023-05-23 13:24 ` jgart
2023-05-23 13:55   ` Andreas Enge
2023-05-23 14:12   ` jgart
2023-05-23 14:22     ` Simon Tournier
2023-05-23 14:28     ` Andreas Enge
2023-05-23 17:20     ` jgart
2023-05-24  3:06       ` Ryan Prior
2023-05-26 15:50 ` Ludovic Courtès
2023-05-27 17:07   ` John Kehayias [this message]
2023-07-02 19:54     ` Ludovic Courtès
2023-07-05 20:23       ` John Kehayias
2023-07-03  0:01     ` jgart
2023-07-16 13:14       ` Ludovic Courtès
2023-07-23 13:00       ` Hartmut Goebel
2023-08-16 14:03         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BegPbs0oRPKod3wpIoiVu-N_q0YL-3oIIb-VxotmjX5qMFZ7WgOd2oVcENndv0zzih5RAZvitF890OzbYSDuZscfsCfCUwNvCJr5Gi73ETU=@protonmail.com' \
    --to=john.kehayias@protonmail.com \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.