mbox series

[bug#51307,v2,0/3] scripts: hash: Several files and serializer.

Message ID 20211118002023.3323307-1-zimon.toutoune@gmail.com
Headers show
Series scripts: hash: Several files and serializer. | expand

Message

Simon Tournier Nov. 18, 2021, 12:20 a.m. UTC
Hi,

The first patch is the one which already made consensus.  Minor suggestions by
[1] has been added.

The 2 following ones add UI presented there [2].  Basically, it allows:

    guix hash foo        # similar as -S none
    guix hash foo -S nar # similar as -r
    guix hash foo -S git

Especially, compare:

        $ cat /tmp/foo.txt | git hash-object --stdin
        557db03de997c86a4a028e1ebd3a1ceb225be238
        $ ./pre-inst-env guix hash -S git -H sha1 -f hex /tmp/foo.txt
        557db03de997c86a4a028e1ebd3a1ceb225be238


Two remarks:

 1. « #:use-module (disarchive) » is added.  Elsewhere (guix download), the
    module is "conditionally" loaded, as if disarchive is an optional
    dependency.  What should be done?

 2. The SWH serializer is not added yet.


Cheers,
simon

1: <http://issues.guix.gnu.org/issue/51307#3>
2: <http://issues.guix.gnu.org/issue/51307#12>

zimoun (3):
  scripts: hash: Support several files.
  scripts: hash: Add 'serializer' option.
  scripts: hash: Add git serializer.

 doc/guix.texi         |  27 +++++++----
 guix/scripts/hash.scm | 108 ++++++++++++++++++++++++++++++------------
 tests/guix-hash.sh    |  20 ++++++--
 3 files changed, 112 insertions(+), 43 deletions(-)


base-commit: 99084abd80d7c81e83263ffc6fd3699aeb8899c5

Comments

Simon Tournier Dec. 15, 2021, 8:06 a.m. UTC | #1
Hi,

What do you think about patch#51307 [1] for “guix hash”?

As explained and discussed earlier in this thread, it renames the option
’-r’ to ’-S nar’ – keeping the old one for backward compatibility* – and
adds ’-S git’.

1: <http://issues.guix.gnu.org/issue/51307>

*backward compatibility: we can come later with a plan to remove and/or
 deprecate.


On Thu, 18 Nov 2021 at 01:20, zimoun <zimon.toutoune@gmail.com> wrote:

> The first patch is the one which already made consensus.  Minor suggestions by
> [1] has been added.
>
> The 2 following ones add UI presented there [2].  Basically, it allows:
>
>     guix hash foo        # similar as -S none
>     guix hash foo -S nar # similar as -r
>     guix hash foo -S git
>
> Especially, compare:
>
>         $ cat /tmp/foo.txt | git hash-object --stdin
>         557db03de997c86a4a028e1ebd3a1ceb225be238
>         $ ./pre-inst-env guix hash -S git -H sha1 -f hex /tmp/foo.txt
>         557db03de997c86a4a028e1ebd3a1ceb225be238
>
>
> Two remarks:
>
>  1. « #:use-module (disarchive) » is added.  Elsewhere (guix download), the
>     module is "conditionally" loaded, as if disarchive is an optional
>     dependency.  What should be done?
>
>  2. The SWH serializer is not added yet.
>
>
> Cheers,
> simon
>
> 1: <http://issues.guix.gnu.org/issue/51307#3>
> 2: <http://issues.guix.gnu.org/issue/51307#12>
>
> zimoun (3):
>   scripts: hash: Support several files.
>   scripts: hash: Add 'serializer' option.
>   scripts: hash: Add git serializer.
>
>  doc/guix.texi         |  27 +++++++----
>  guix/scripts/hash.scm | 108 ++++++++++++++++++++++++++++++------------
>  tests/guix-hash.sh    |  20 ++++++--
>  3 files changed, 112 insertions(+), 43 deletions(-)
>
>
> base-commit: 99084abd80d7c81e83263ffc6fd3699aeb8899c5

Cheers,
simon
Ludovic Courtès Dec. 15, 2021, 10:05 a.m. UTC | #2
Hi!

zimoun <zimon.toutoune@gmail.com> skribis:

> What do you think about patch#51307 [1] for “guix hash”?

I haven’t forgotten about it but I’m lagging behind.

I’m getting there, apologies for the delay!

Ludo’.