all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: "Ryan Prior" <ryanprior@hey.com>, "Ludovic Courtès" <ludo@gnu.org>
Cc: Development of GNU Guix and the GNU System distribution
	<guix-devel@gnu.org>
Subject: Re: Announcing emacs-guix-packaging
Date: Fri, 13 Nov 2020 10:45:08 +0100	[thread overview]
Message-ID: <87ft5dzj2z.fsf@ambrevar.xyz> (raw)
In-Reply-To: <b0ab7524ec33b251f16aca9fb39451b69e53b045@hey.com>

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

Hi!

On the one hand, I can only echo Ryan's experience, and I suppose the
experience of most of us: emacs-guix has been a bit broken for a while
now.

I believe it suffers from 2 main issues:

- Geiser is a strong dependency: everything depends from a well-working
  Geiser REPL.

  - Geiser 0.12 broke the REPL setup :(
  - Geiser chokes on large outputs, which happens on any Guix build.  So
    you can't build anything with emacs-guix.

- Emacs-Guix uses private parts of Guix if I'm not mistaken.  Since
  these parts are prone to change, it breaks Emacs-Guix once in a while.

Finally, it seems that Emacs-Guix is mostly unmaintained now:

https://github.com/alezost/guix.el/issues/38#issuecomment-617718043

On the other hand, leveraging the actual Guix API is a saner approach
than parsing the output.

It's what I did in Nyxt:

https://github.com/atlas-engineer/nyxt/blob/2-pre-release-4/libraries/ospama/ospama-guix.lisp

It's fast, reliable, flexible, structured.

> On the other hand, I am interested in building out a formal API for
> tools to interface with Guix without having to depend on its internals
> or parse the output of its CLI commands. This could be a Guile API,
> although I picture json would be a better choice to support diverse
> tooling.

Guix already has a stable API that can be leveraged by any programming
language thanks to the `guix repl` command.  This is what I'm doing in
Nyxt.

> For one example of what I'd want the API for, in my `guix-packaging-
> insert-input` command I need to get the list of available Guix packages,
> and then for the selected package I need to find its scheme symbol. The
> emacs-guix approach to those things is to reach into Guix internal data
> structures and read out that data, which doesn't deliver results in
> practice.

Maybe emacs-guix does not do it well, but `fold-packages` works well for
Nyxt in practice!

> I opt instead to parse the output of the CLI command `guix
> package -A ""` as a tsv, which works as long as Guix doesn't change its
> output, but that's not guaranteed either.

Indeed, I don't think this is the right approach :p

Let me know what you think!

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

  reply	other threads:[~2020-11-13  9:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  5:07 Announcing emacs-guix-packaging Ryan Prior
2020-11-10 13:30 ` Pierre Neidhardt
2020-11-12 20:53 ` Ludovic Courtès
2020-11-13  1:28   ` Ryan Prior
2020-11-13  9:45     ` Pierre Neidhardt [this message]
2020-11-13 13:20       ` zimoun
2020-11-13 14:54         ` John Soo
2020-11-13 16:54       ` Reviving Emacs-Guix Ludovic Courtès
2020-11-13 17:13         ` John Soo
2020-11-13 18:42         ` zimoun
2020-11-16  8:56           ` Ludovic Courtès
2020-11-14  9:42         ` Pierre Neidhardt
2020-11-14 12:57           ` zimoun
2020-11-14 15:59             ` Pierre Neidhardt
2020-11-14 16:56               ` zimoun
2020-11-14 17:30                 ` Pierre Neidhardt
2020-11-14 18:40                   ` zimoun
2020-11-14 19:15                     ` Pierre Neidhardt
2020-11-14 19:52                       ` Ricardo Wurmus
2020-11-14 21:29                         ` zimoun
2020-11-15  7:37                           ` Pierre Neidhardt
2020-11-15 13:15                             ` zimoun
2020-11-15 14:11                               ` Pierre Neidhardt
2020-11-15 15:23                                 ` zimoun
2020-11-15 15:45                                   ` Pierre Neidhardt
2020-11-15 16:05                                     ` zimoun
2020-11-14 21:11                       ` zimoun
2020-11-15  7:53                         ` Pierre Neidhardt
2020-11-14 19:49           ` Ricardo Wurmus
2020-11-15  7:36             ` Pierre Neidhardt
2020-11-16  9:02             ` Ludovic Courtès
2020-11-16  9:18               ` Pierre Neidhardt
2020-11-16 12:01                 ` zimoun
2020-11-16 12:20                   ` Pierre Neidhardt
2020-11-16 12:47                     ` zimoun
2020-11-17  7:53                       ` Pierre Neidhardt
2020-11-13 12:31     ` Announcing emacs-guix-packaging zimoun

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=87ft5dzj2z.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=ryanprior@hey.com \
    /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.