unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Christopher Baines" <guix@cbaines.net>,
	71038@debbugs.gnu.org
Subject: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders.
Date: Tue, 11 Jun 2024 20:26:22 +0100	[thread overview]
Message-ID: <87a5jr8en5.fsf@cbaines.net> (raw)
In-Reply-To: <875xuz18c4.fsf@gmail.com> (Simon Tournier's message of "Mon, 27 May 2024 19:19:07 +0200")

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

Simon Tournier <zimon.toutoune@gmail.com> writes:

> On Sun, 26 May 2024 at 09:10, Christopher Baines <mail@cbaines.net> wrote:
>
>>>>  (define* (open-connection #:optional (uri (%daemon-socket-uri))
>>>>                            #:key port (reserve-space? #t) cpu-affinity
>>>> -                          non-blocking?)
>>>> +                          non-blocking? assume-available-builtin-builders)
>>>
>>> Why add the variable %assume-available-builtin-builders and default to
>>> it?
>>>
>>> Something like:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> (define %assume-available-builtin-builders
>>>   "List of builtin builders supported by the builder Guix daemon."
>>>   (list "download" "git-download"))
>>>
>>> (define* (open-connection #:optional (uri (%daemon-socket-uri))
>>>                           #:key port (reserve-space? #t) cpu-affinity
>>>                           non-blocking?)
>>>                           non-blocking?
>>>                           (assume-available-builtin-builders %assume-available-builtin-builders))
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> And then default to this %assume-available-builtin-builders elsewhere in
>>> [PATCH 2/2].  IMHO, it changes almost nothing but it would help to know
>>> (document) what to pass as argument.
>>
>> I think it's sensible to not use a fixed list by default, but check what
>> the daemon supports.
>
> Do you mean dynamically construct the proposal of
> %assume-available-builtin-builders?  Why not.
>
> Aside, my point is to provide a default value for the new argument and
> not let it free.  Because when reading the source code, not knowing its
> type, neither any meaningful value make it hard to remember what it use
> or how to use it, IMHO.  That’s why I am suggesting something like
> %assume-available-builtin-builders that collects the acceptable values
> – for the most recent daemon, indeed; well it would simplify the
> documentation of this new parameter / argument.

I'm not sure I follow. I guess open-connection could have a
#:build-in-builders argument that expects a procedure that takes the
store connection, and returns the list of strings. That would allow it
to have the default of %built-in-builders from (guix store).

While this adds the flexibility for users to provide their own way of
setting the builtin builders enabled on a connection, I'm not sure
there's a need for it currently and I don't think it addresses your
concern about not knowing what value to provide.

It sounds easier just to make it clear from the docstrings that you
provide a list of strings, and have it default to #f to indicate to the
daemon's buildin builders.

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

  reply	other threads:[~2024-06-11 19:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18 13:11 [bug#71038] [PATCH 0/2] Enable specifying the available builtin builders Christopher Baines
2024-05-18 13:19 ` [bug#71038] [PATCH 1/2] guix: store: " Christopher Baines
2024-05-18 13:19   ` [bug#71038] [PATCH 2/2] guix: channels: Enable specifiying " Christopher Baines
2024-05-22 10:58   ` [bug#71038] [PATCH 1/2] guix: store: Enable specifying the " Simon Tournier
2024-05-26  8:10     ` Christopher Baines
2024-05-27 17:19       ` Simon Tournier
2024-06-11 19:26         ` Christopher Baines [this message]
2024-06-24 13:43 ` [bug#71038] [PATCH v2 " Christopher Baines
2024-06-24 13:43   ` [bug#71038] [PATCH v2 2/2] guix: channels: Enable specifiying " Christopher Baines
2024-07-04  9:17     ` Ludovic Courtès
2024-07-04  9:14   ` [bug#71038] [PATCH v2 1/2] guix: store: Enable specifying the " Ludovic Courtès via Guix-patches
2024-07-04 11:50 ` [bug#71038] [PATCH v3 1/2] guix: store: Enable specifying the " Christopher Baines
2024-07-04 11:50   ` [bug#71038] [PATCH v3 2/2] guix: channels: Enable specifiying available " Christopher Baines
2024-07-16 10:05     ` Ludovic Courtès
2024-07-16 13:13       ` Christopher Baines
2024-07-16 12:48 ` [bug#71038] [PATCH v4 1/3] guix: store: Enable specifying the " Christopher Baines
2024-07-16 12:48   ` [bug#71038] [PATCH v4 2/3] guix: channels: Enable specifiying available " Christopher Baines
2024-07-16 12:48   ` [bug#71038] [PATCH v4 3/3] inferior: Use the host built-in-builders with inferior Christopher Baines
2024-07-18  9:35     ` Ludovic Courtès
2024-07-18 13:08       ` bug#71038: " Christopher Baines

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87a5jr8en5.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=71038@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).