guix-devel
[Top][All Lists]
Advanced

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

Re: new manifest format readers?


From: myglc2
Subject: Re: new manifest format readers?
Date: Sat, 10 Jun 2017 13:19:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

On 06/09/2017 at 14:03 Ricardo Wurmus writes:

> Hi Guix,
>
> I received some feedback on the usability of Guix and one of the points
> I got was about manifests.
>
[...]
> What do you think?

I use manifests all the time.  In my experience, a more basic issue than
the syntax is that, when you make an error, you get smacked with an
uninformative trace back. It doesn't help that, depending on the
manifest form used, you must use specify a package in terms of a string
or a symbol.

So I wonder: When users complain about manifests, is it really about the
syntax or is it about the error handling?

ISTM that, before we create a new manifest syntax, we should add some
"package validation" that traps errors and produces more informative
messages.  I know nothing about guile error handling but that doesn't
stop me from imagining ...


... an enhanced 'package->manifest' function that does something like ...

          (use-package-modules guile emacs)
          (packages->manifest
           (list emacs
                 guile-2.0
                 foo
                 ;; Use a specific package output.
                 (list guile-2.0 "debug")))

Error: packages->manifest: 'foo' is unspecified.

Message: guix module foobar contains recipes for foo versions 3.0 &
         3.2. You can install package foo version 3.2 by adding
         '(use-package-modules foobar)' before '(packages->manifest
         ...'.


... an enhanced 'specification->package+output' function that does something 
like ...

(packages->manifest
           (map (compose list specification->package+output)
                '("emacs" "address@hidden" "address@hidden:debug" 
address@hidden)))

Error: specification->package+output: You used 'address@hidden' where a quoted
       string was expected.

Message: Guix contains recipes for foo versions 3.0 & 3.2. You can
         install foo version 3.2 by replacing 'foo' with '"foo"' or
         '"address@hidden"'


... and an enhanced 'packages' function that does something like ...

       ;; Globally-installed packages.
       (packages (package-check tcpdump foo %base-packages))

Error: packages: 'foo' is unspecified.

Message: guix module foobar contains recipes for foo versions 3.0 &
         3.2. You can install package foo version 3.2 by adding
         '(use-package-modules foobar)' before '(packages ...'.

WDYT? - George



reply via email to

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