GNU bug report logs - #70494
[PATCH 00/23] Groundwork for the Guile guix-daemon

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 21 Apr 2024 09:37:01 UTC

Severity: normal

Tags: patch

Full log


Message #92 received at 70494 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 70494 <at> debbugs.gnu.org,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>,
 Christopher Baines <guix <at> cbaines.net>
Subject: Re: [bug#70494] [PATCH 06/23] store: Export protocol related
 constants.
Date: Mon, 13 May 2024 17:58:04 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> * guix/store.scm (%protocol-version, %worker-magic-1, %worker-magic-2): Export
> variables.
> (protocol-major, protocol-minor, protocol-version): Export procedures.
> (%stderr-next, %stderr-read, %stderr-write, %stderr-last, %stderr-error):
> Move from process-stderr and export variables.
>
> Change-Id: Id0b1b5e6feeac5260875558f33aa5d923d5e0903
> ---
>  guix/store.scm | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/guix/store.scm b/guix/store.scm
> index c3b58090e5..578e46507e 100644
> --- a/guix/store.scm
> +++ b/guix/store.scm
> @@ -206,18 +206,25 @@ (define-module (guix store)
>              derivation-log-file
>              log-file))
>  
> -(define %protocol-version #x164)
> +(define-public %protocol-version #x164)
>  
> -(define %worker-magic-1 #x6e697863)               ; "nixc"
> -(define %worker-magic-2 #x6478696f)               ; "dxio"
> +(define-public %worker-magic-1 #x6e697863)               ; "nixc"
> +(define-public %worker-magic-2 #x6478696f)               ; "dxio"

Two things:

  1. This is a case for a new (guix store protocol) module.  Preferably
     I would keep those constants local to that module and instead
     expose higher-level facilities, but we can start by just exporting
     these constants.

  2. From a cosmetic viewpoint, please use #:export rather than
     ‘define-public’, for clarity (package modules are the exception).

Ludo’.




This bug report was last modified 1 year and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.