guix-patches
[Top][All Lists]
Advanced

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

[bug#70494] [PATCH 06/23] store: Export protocol related constants.


From: Ludovic Courtès
Subject: [bug#70494] [PATCH 06/23] store: Export protocol related constants.
Date: Mon, 13 May 2024 17:58:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Christopher Baines <mail@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’.





reply via email to

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