From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sDc9HMZ15WQ8OwAASxT56A (envelope-from ) for ; Wed, 23 Aug 2023 04:58:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EFdKHMZ15WSW/wAA9RJhRA (envelope-from ) for ; Wed, 23 Aug 2023 04:58:14 +0200 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 E434E6A2B0 for ; Wed, 23 Aug 2023 04:58:13 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=Pf8EDnLh; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692759494; a=rsa-sha256; cv=none; b=QZJLn5RnIPLgKa2j+pWSGg1E2ZXngnnap9BpZPb76FT6tnSN2naQMn7+ufec1bGepLGgLU iUGmpxhUbKqL0VV/cmNsZkL9IuJlqEz0ih6TU465j/rZm6bsGLu33OlNVrWbPh9Fx0v1uG bazHG2edZPRAZtjDGGbbRZ4vIQXBUGpvcbaJTDj2WMaOews8FGgPjmFyuTTZoJFfj638WE Ajn+CA5hNNn5vuVqTypQjYZz0YYYB0rtiTv9pZqU6dxaT6cZrB8F4avJAGgUoF2Vqz+9F+ FCeK9ZS6VSb/nYrnbcM9kv6fksH7y4iTnJlKFei4iMg+WKuIH5ebTiRCLi83UA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=Pf8EDnLh; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692759494; 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: dkim-signature; bh=hRSQP5n1Hv53odESZ0GUgjXzNC4ri33yGZPPdx/cT7k=; b=a9BnrZbf+hDr3SWiLzFZ0r+MA+PbTKoxy2h/ifKMjaUcJNMjD8GFu93XZIA3TH5O7026jU +gI3+LF4vi4O4jSASufyutxv2oYt7mOF6lELWwmLjafVLHBtVRBoN8Ftcj99WSlUGns/Vg Dt6aLnsSTHzah/vviDNGoakKkSH1CrGelkznkfuBQ8W2+8xV/3T3CTYL0Wg0Y4O0csQnTu TmZwn14LxnCSx8ouYXDEzxibGGnYTtMbv9iGdw2gjP+lXWJl4EC/LEwc3AaK04VnDXH/aY INbJ7Ef9gb3maYZvmrLB9oggXk2aL1y6hxNugMB3QKdWe08Lx9HVs1JtuG6Oxw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYe4G-00029L-UB; Tue, 22 Aug 2023 22:58:00 -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 1qYe4F-000299-Fk for guix-patches@gnu.org; Tue, 22 Aug 2023 22:57:59 -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 1qYe4F-0002NJ-3x for guix-patches@gnu.org; Tue, 22 Aug 2023 22:57:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYe4I-0003gT-70 for guix-patches@gnu.org; Tue, 22 Aug 2023 22:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65352] Fix time-machine and network Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Aug 2023 02:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65352 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Simon Tournier Cc: 65352@debbugs.gnu.org Received: via spool by 65352-submit@debbugs.gnu.org id=B65352.169275943014105 (code B ref 65352); Wed, 23 Aug 2023 02:58:02 +0000 Received: (at 65352) by debbugs.gnu.org; 23 Aug 2023 02:57:10 +0000 Received: from localhost ([127.0.0.1]:60755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYe3S-0003fR-BO for submit@debbugs.gnu.org; Tue, 22 Aug 2023 22:57:10 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:60501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYe3Q-0003fF-UJ for 65352@debbugs.gnu.org; Tue, 22 Aug 2023 22:57:09 -0400 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-76dbd877cd9so19705485a.0 for <65352@debbugs.gnu.org>; Tue, 22 Aug 2023 19:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692759420; x=1693364220; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hRSQP5n1Hv53odESZ0GUgjXzNC4ri33yGZPPdx/cT7k=; b=Pf8EDnLh9pkAVOPBqYQW8iu1jjIhDRM04H9YmP2Z5YI0RT4TZqKEXEARgM3qCiE01g 2jZ+r/oCLQv7H6KAdPCrkzjy/M2jJaRntRrPm03muCZ6UzpKsOO2i1/m8c1FbfSLh1em AV+SgqCnRxWMR7KLuKkDn3pjToCjLkW+MwBjHJsVystRz8SkrJqQfcJfPTaP2JaeDrOl b+28Mm7RHmPOCHprc8HysZkvJ4BU/3ZvBYVLYJBTdX36vAqhKF00QZG3EsVKAsYy3JJ5 yAXo51+GHwH2ZHaHXfyNvID4MLu3xs/vD/Xwen6rhlPa8J58p5nTuz8SOfHDJycjcPtP ujcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692759420; x=1693364220; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hRSQP5n1Hv53odESZ0GUgjXzNC4ri33yGZPPdx/cT7k=; b=daTLMowB2Dmnqogh75gt7YMTSG+DTsc0m8rZ0dstXTZ1jsH+qx0qp6qOtEWNkmKyTn BtN8Hpflg6GsNH+eN2wK1jJC7qm8yTnb+wDaT5s3A4E9WfDlhHfqq+MK/blu42a8q012 hu3qzXaqJ7Jc+tKYvlmc42J/M8+IvD7pG6UOWPQpW/QiA0TZg8oxJY5rSI+VUWKkRmpg 0EeJ5afA/zltIVfDN3+Bh0HL4ZxAYsVarPVWz5HT1ZzvAf3obDTl7h0YfFNnU/SrE1oE cnb0YkM2/274kHvSb8CwTuyCTVRgyEVHvHUea9vtFqvG5NHepGGZ9s5laQv799kLJh5m oatA== X-Gm-Message-State: AOJu0YwH7tjlaKqki1DqEZ2P4OGidn9Pb3wvYraswNORb2acnXksN+MN zWPby50RD3ao3ngJkTym3gcPmoNU2h9SvA== X-Google-Smtp-Source: AGHT+IE4u31o0ily8ohm6uPbQbBik5psuQRY+yD7K4PVtNn+Zz5ZDBblSHZIuEMzUQbW16Sb3WrvgA== X-Received: by 2002:a05:620a:305:b0:76d:1223:10e8 with SMTP id s5-20020a05620a030500b0076d122310e8mr12194042qkm.46.1692759419809; Tue, 22 Aug 2023 19:56:59 -0700 (PDT) Received: from hurd (dsl-158-129.b2b2c.ca. [66.158.158.129]) by smtp.gmail.com with ESMTPSA id q8-20020a05620a038800b0076800354830sm3643030qkm.2.2023.08.22.19.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 19:56:59 -0700 (PDT) From: Maxim Cournoyer References: <444e7e32d49b56ba6cb0a132e97d63560d8de437.1692281315.git.zimon.toutoune@gmail.com> <87o7j5fzg8.fsf_-_@gmail.com> Date: Tue, 22 Aug 2023 22:56:57 -0400 In-Reply-To: (Simon Tournier's message of "Thu, 17 Aug 2023 18:08:38 +0200") Message-ID: <87ttsqa2km.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Spam-Score: -5.11 X-Migadu-Queue-Id: E434E6A2B0 X-Migadu-Spam-Score: -5.11 X-TUID: OU1BJMxTdwtL Hi Simon, Simon Tournier writes: > Hi Maxim, > > On Thu, 17 Aug 2023 at 17:42, Maxim Cournoyer wrote: > >> > (match ref >> > - ((or ('commit . commit) >> > - ('tag-or-commit . commit)) >> > + (('tag-or-commit . commit) > >> Not that channel-list is a public API, so this is effectively changing >> the contract, no? > > Well, the contract is not clearly defined. ;-) > > The REF is defined by the docstring of update-cached-checkout, > > REF is pair whose key is [branch | commit | tag | tag-or-commit ] and value > the associated data: [ | | | ]. > If REF is the empty list, the remote HEAD is used. Good catch, it seems tag is not covered. > Therefore, if we want to be compliant with the public API, we also > need to add 'tag' to the 'or' match case; as I suggested when > commenting your patch tweaking this part. :-) > > Well, from my point of view, the alternative is: > > a) > (match ref > (('tag-or-commit . commit) > (channel (inherit c) > (url url) (commit commit) (branch #f))) > (('branch . branch) > (channel (inherit c) > (url url) (commit #f) (branch branch))) > (#f > (channel (inherit c) (url url)))) > > or b) > (match ref > ((or ('commit . commit) > ('tag-or-commit . commit) > ('tag . commit)) > (channel (inherit c) > (url url) (commit commit) (branch #f))) > (('branch . branch) > (channel (inherit c) > (url url) (commit #f) (branch branch))) > (#f > (channel (inherit c) (url url))))) > > but not ecab937897385fce3e3ce0c5f128afba4304187c. :-) I was driven by my use case where adding support for tag-or-commit was enough, but I think it'd be a good idea to cover all the potential ref types documented in update-cached-checkout, so b) makes sense to me. -- Thanks, Maxim