From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qDMrCBulaGZxmQAA62LTzQ:P1 (envelope-from ) for ; Tue, 11 Jun 2024 19:27:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id qDMrCBulaGZxmQAA62LTzQ (envelope-from ) for ; Tue, 11 Jun 2024 21:27:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718134042; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=tUET9aMVVXkk1HpHwoqUk3emAP6WXm1VfiZFZczflNM=; b=kECR1IGI383haUdefEqclR5/RoHFxlrwKEtsztH17axfaicpI3OIJK7JWwmqcFtvei8nka UYkGYakAEHnJm6Syil25OSqX162PNueLnox0lTLZi6T3TqV8rUPJSIBQ1diMt86JYvAVtM FhVLioq1gP7Q+tS0pCrO/Ke42VSWtuDQg0ZM4wE6NdoLAl5AgZZ6TKfiZgZ+fu0zFfEeQp nGBZLDizR/Sb/y/LAhmLyiqgWlx4jYA+A5eMmmmEmgNhS5iWpHdFn9nc4RqOBWRxZk8Qkn IDIk+KQEjh8Va1u5Wp0kysXVFKAL5w6CV+yXPaGm/1uKvNlChRcZSA/AUsFpvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718134042; a=rsa-sha256; cv=none; b=X8CmlZOC0rhhWZUK6IdbmKEXkPfbxdI/+idK5UnVpYvrTR8vLWwV75HFTpUN/HsY9Ogxnf 0WdwaYePmiKeULe7PlZW0QnTNJWz3J99MiknaoZOqZYzy35s271Hiyyj6NCyxh0yNThoSN PQeq+0ObxaCC1Rmi/H3idHrK7ihc5uHT/7WNgwsEP9lWK+fRlLfvoI85DkYUTYQWG0Ui8M 13QzIP85BP6b69kXTIoV49VJXtJl73W+z+bnAkJuXumKDa0d94yDDEzODpWwv531yRm0XG Ti+6nGXASk6Rk1k6MVE7N2VHEH150GzEYXuvIfMdpMyhKEeoNLwbSIVa/qqfMQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3B7F520204 for ; Tue, 11 Jun 2024 21:27:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sH797-0005h8-UO; Tue, 11 Jun 2024 15:27:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sH796-0005gu-G7 for guix-patches@gnu.org; Tue, 11 Jun 2024 15:27:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sH796-0007Xl-8O for guix-patches@gnu.org; Tue, 11 Jun 2024 15:27:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sH794-000196-GU for guix-patches@gnu.org; Tue, 11 Jun 2024 15:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 Jun 2024 19:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71038 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 71038@debbugs.gnu.org Received: via spool by 71038-submit@debbugs.gnu.org id=B71038.17181340174393 (code B ref 71038); Tue, 11 Jun 2024 19:27:02 +0000 Received: (at 71038) by debbugs.gnu.org; 11 Jun 2024 19:26:57 +0000 Received: from localhost ([127.0.0.1]:36256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH78z-00018n-BX for submit@debbugs.gnu.org; Tue, 11 Jun 2024 15:26:57 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH78x-00018c-Pl for 71038@debbugs.gnu.org; Tue, 11 Jun 2024 15:26:56 -0400 Received: from localhost (unknown [212.132.255.10]) by mira.cbaines.net (Postfix) with ESMTPSA id 1E3DF27BBE2; Tue, 11 Jun 2024 20:26:26 +0100 (BST) Received: from felis (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bd40b795; Tue, 11 Jun 2024 19:26:25 +0000 (UTC) From: Christopher Baines In-Reply-To: <875xuz18c4.fsf@gmail.com> (Simon Tournier's message of "Mon, 27 May 2024 19:19:07 +0200") References: <87y187b6xv.fsf@cbaines.net> <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> <87a5ki3ygr.fsf@gmail.com> <87sey5f0xr.fsf@cbaines.net> <875xuz18c4.fsf@gmail.com> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Tue, 11 Jun 2024 20:26:22 +0100 Message-ID: <87a5jr8en5.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.94 X-Migadu-Queue-Id: 3B7F520204 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.94 X-TUID: xmKP1/gm72GS --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Simon Tournier writes: > On Sun, 26 May 2024 at 09:10, Christopher Baines wrote: > >>>> (define* (open-connection #:optional (uri (%daemon-socket-uri)) >>>> #:key port (reserve-space? #t) cpu-affinity >>>> - non-blocking?) >>>> + non-blocking? assume-available-builtin-buil= ders) >>> >>> 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-av= ailable-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=E2=80=99s why I am suggesting something like > %assume-available-builtin-builders that collects the acceptable values > =E2=80=93 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmZopN5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xd4QA//UI6mRApXQdXUzR/9JiF5yeilQ7TKjIlJ /eajba3vSyzchjKnKiOPhJgpgzSQ3vvppsSJHiXXy3wyhv1z5vNF55GmZtNY720m VGvF6imjom1TUnIZw2bKsBSA0Pj0ctRbsMDb3U1D1XLPpZHa/om4jclXbpIYzVT5 UJgLatZyayd/3OjVuQ78shmgaeOdV6BLRZPe118mJI8uJI7Kfxdb+MyWMmp/wN3E bH3P+ajJjWoSv6qClJdrChJ+UlWnCki11EK4UWtJzrA93FAU5iMl7MEYYOwrgL3i VbsdqXPkgWMypvnzsxhZNKprSXkz2PVcRFVg3MvJSEc8JlLAngTQqnkGGJsyvcBk 4qaannuRp0WS7psZmVH9FCNQGaT189pBUdgrFlb20gJjFJlOLQsCgJaH0YA4BqQQ nskeVbFj8S4EyvsLobmUXNSNVb89hm9+GisrT7K4qQ8MboKx/WEZtTqchRZO89nX dmx9jSgAeDhJq/RS7hdzh7SZsTmEt+rcsMgRsFZRiZnrEBEghJi2xb6AjhWozxvA LPIVAgEnmyMgQrLm1KIkyWhEwXh5hLMx8d6yUFsWjy0ZSe905hF6vKU0dcKactKP xbGP+OHGP4V4jRGy5KhpYshYNH6cNY/7KEED8PR6o/CvRyOlefopMgTz8g3QSHQX X1gV4+qnmbI= =dKYM -----END PGP SIGNATURE----- --=-=-=--