From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6L6cB/uflWHvVwAAgWs5BA (envelope-from ) for ; Thu, 18 Nov 2021 01:36:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 9iE+A/uflWEtKQAA1q6Kng (envelope-from ) for ; Thu, 18 Nov 2021 00:36:11 +0000 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 D5F9E34310 for ; Thu, 18 Nov 2021 01:36:10 +0100 (CET) Received: from localhost ([::1]:52280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnVPN-0005S9-FN for larch@yhetil.org; Wed, 17 Nov 2021 19:36:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnVPG-0005Ql-G6 for guix-patches@gnu.org; Wed, 17 Nov 2021 19:36:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnVPG-0001R0-7K for guix-patches@gnu.org; Wed, 17 Nov 2021 19:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mnVPF-0007VL-SH for guix-patches@gnu.org; Wed, 17 Nov 2021 19:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51307] Content hashes and file tree serialization methods Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 Nov 2021 00:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 51307@debbugs.gnu.org Received: via spool by 51307-submit@debbugs.gnu.org id=B51307.163719576128840 (code B ref 51307); Thu, 18 Nov 2021 00:36:01 +0000 Received: (at 51307) by debbugs.gnu.org; 18 Nov 2021 00:36:01 +0000 Received: from localhost ([127.0.0.1]:34151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnVPE-0007V6-Ml for submit@debbugs.gnu.org; Wed, 17 Nov 2021 19:36:00 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:34340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnVPA-0007Uj-FR for 51307@debbugs.gnu.org; Wed, 17 Nov 2021 19:35:59 -0500 Received: by mail-wr1-f42.google.com with SMTP id d5so8051494wrc.1 for <51307@debbugs.gnu.org>; Wed, 17 Nov 2021 16:35:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=XrLikOrOltmKYFTGn2ifLyEUjrljqnpnwHcI6f7B1vs=; b=PIobW36jRgLrCx/qXLb+SRUsgloqZlXcK2YhQuBQIdkNcAUsxq1t0kr+i9EBx5ysDA BWElHgtzFMArmVc1s92IodWRUMcbkOl/9LS+GYDT2weAjVROao35aRxsmK+O+U9pxVPd nyhZJYmvnVFYQRCmWqY07pIc1qR06qCfYxgeUN7bw7tA2sHeuU+XoRBTHZs49D6n1AoL irLFBtOiwP4BgHasJaukDIQ0wVDvAN4ZME8m2inF5xz2Lo8+00GJF6Q9nDN4KdIbEWIC y691yfDMe1vofqnE54qNEUsmIYq/zMe+EgMlSR1zmoMub/EMgl/8b+UtUf09bHRhF+rC I94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=XrLikOrOltmKYFTGn2ifLyEUjrljqnpnwHcI6f7B1vs=; b=lKoTb8LEXOOwu8OnSkk/9e1S5ELPP7IaFaio0jP8kgwZ3QkPJ2pdanmoO2vaukAa/A 0JJ28HxNThviX/AU27+bg0+A5v7X3qKAKH0jrn9uGmqioGUyNCz+SfWJ7U64ewG6Qzuc qZNK3YYY3X56zwlGotWVazgKutg3JN2/tTnR0mkfFKC9pcugb9wPNq3LL5JL1wjhL4V5 Hcg8xLo45n4wmXaGfLQvZ9MfnkxCBMZQQLQbQjBrr3FkmCqJYhfNfDoNZBb6k1dx08aL +nHI6GiBVslW4H+lKG19X5txh/rJgDeaGrtYpWk7U4+ljjh3YbiNUh06N8Ijo6QmVxBn Yxog== X-Gm-Message-State: AOAM532VYGuvD2VSr58by3vraCnL49u51ybAxlHHc7lkziJgZpDKefWH IZ2VIXn2W7RonBRXf0AcKGmJvVTve+4= X-Google-Smtp-Source: ABdhPJySXezOwBohriM+oM0+QbBEfC/N3jEG7uVvExOwjtDUv/ahWi8xS4VIzYW6PzPcOfw/mqm9Yw== X-Received: by 2002:a05:6000:1289:: with SMTP id f9mr26834296wrx.329.1637195750590; Wed, 17 Nov 2021 16:35:50 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id x4sm6828283wmi.3.2021.11.17.16.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Nov 2021 16:35:49 -0800 (PST) From: zimoun In-Reply-To: <87mtmpntcf.fsf_-_@gnu.org> References: <20211020165020.3358311-1-zimon.toutoune@gmail.com> <87wnlusgwy.fsf@gnu.org> <86tugyleub.fsf@gmail.com> <87mtmpntcf.fsf_-_@gnu.org> Date: Thu, 18 Nov 2021 01:29:27 +0100 Message-ID: <86wnl6qpaw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637195770; 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: content-transfer-encoding:content-transfer-encoding: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:dkim-signature; bh=XrLikOrOltmKYFTGn2ifLyEUjrljqnpnwHcI6f7B1vs=; b=AoaUpcxO+17Z9WecL5uK4wvULXvaAwVK/o+mv8Prjxf2oUjbC7rPiO/8PrQSiy/A9ssgZV FPEmJ0qppkZiHfmrRQUGSk4RRQ4EAMeowfhQdU/Jpyw2OZp/r/JTD5lsI2NEzkVYWseTOi 0THbt4RHhrGuYA9pW19o5w8Ezu87fi9MdIKul4C/J4b+hunIO1PP3jeAKflOEgqfMxD2KR ONpla4pWbeM8xGzs6Zu74E4UjPbjmytGMllqRiII/7hAEoqG0b/UY5A7pL8pB4ShlCQXEF e5XKTH/ZWJvpZv5EbkyekdEmlzAeV6ipzvF3AfH2/C+Zxy/QbptgvzJq7jarZg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637195770; a=rsa-sha256; cv=none; b=XjMta70nraQLhLsjwSReAjB750cUFtDd5l+ohj+aM/+XrQjh3THH+Nsb7SffFHkua4a19j lSROwhEzs0AHAaf3628P0fHZO1zxy5XH11jPO/S+Joa4uMYzzbkB11G/VkHN9YsmuxDdv7 Lj9HJJS7HKZhRfeVjlmQm2aHpvPUhv+rbW/sKzJwqqu3iCxvfnZt2W8IJGpIWLT+gtitot 71DmxQiCqYAuGQSsPkEfbUG36F0/N7bVvBytDUTDNZ+VnHzWjQrCOPPC6Tz9zWq8bjUHG3 m2o3N62mnP/HCNFjp70YBr8ZavfGaM6UGS6m0/MEJIePm6W7aFj3jlnA3vJfPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=PIobW36j; 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" X-Migadu-Spam-Score: -1.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=PIobW36j; 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" X-Migadu-Queue-Id: D5F9E34310 X-Spam-Score: -1.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: KbHs0zGAoSXt Hi Ludo, On Sun, 31 Oct 2021 at 15:48, Ludovic Court=C3=A8s wrote: > Thinking more about it, I think confusion stems from the term > =E2=80=9Crecursive=E2=80=9D (inherited from Nix) because, as you write, i= t doesn=E2=80=99t > necessarily have to do with recursion and directory traversal. > > Instead, it has to do with the serialization method. > > Thus, probably, =E2=80=98--recursive=E2=80=99 could be replaced by a =E2= =80=98-S=E2=80=99 flag: > > guix hash -S nar something > > or: > > guix hash -S none something > guix hash -S git something > guix hash -S swh something > > =E2=80=98-S none=E2=80=99 would be like not passing =E2=80=98-r=E2=80=99;= =E2=80=98-S git=E2=80=99 would serialize the > file/directory as a Git tree; =E2=80=98-S swh=E2=80=99 would serialize it= the SWH way, > which is like Git except it preserves empty directories (Disarchive > implements the Git/SWH methods already.) Well, v2 is an attempt for this UI. It does not solve my initial problem but it is a first step in that direction. ;-) Note that SWH serializer is not added. Because I have probably missed to reach the implementation. :-) Well, next step could be to add an option =E2=80=9C--list-serializers=E2=80= =9C. Let as an exercise for the reader. ;-) > As mentioned towards the end of > , > being able to deal with different tree serialization methods would be > useful going forward; for instance, if we had the option to store > SWH-style content hashes for origins, that=E2=80=99d help a lot. Allowin= g =E2=80=98guix > hash=E2=80=99 to deal with that is a first step in that direction. Well, this series does not add SWH-style but it is a tiny step in that direction. Somehow, after v2-patch#2, it is easy to add as many serializers as we want. :-) > (Apologies for slipping a bit off-topic=E2=80=A6) Thanks for slipping off-topic. :-) Cheers, simon *serializer: it is not an English word but I lacked imagination.