From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QHl/Ep8SQ2GvRgEAgWs5BA (envelope-from ) for ; Thu, 16 Sep 2021 11:47:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id APQqDp8SQ2EHKQAAbx9fmQ (envelope-from ) for ; Thu, 16 Sep 2021 09:47: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 AEB9E1A884 for ; Thu, 16 Sep 2021 11:47:10 +0200 (CEST) Received: from localhost ([::1]:34898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQnz3-0008I5-OU for larch@yhetil.org; Thu, 16 Sep 2021 05:47:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQnyw-0008EW-NE for guix-patches@gnu.org; Thu, 16 Sep 2021 05:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQnyw-0002Lh-DS for guix-patches@gnu.org; Thu, 16 Sep 2021 05:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQnyw-0001UM-88 for guix-patches@gnu.org; Thu, 16 Sep 2021 05:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50359] [PATCH 3/3] import: Add 'generic-git' updater. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Sep 2021 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50359 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 50359@debbugs.gnu.org Received: via spool by 50359-submit@debbugs.gnu.org id=B50359.16317855783598 (code B ref 50359); Thu, 16 Sep 2021 09:47:02 +0000 Received: (at 50359) by debbugs.gnu.org; 16 Sep 2021 09:46:18 +0000 Received: from localhost ([127.0.0.1]:53862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQnyD-0000vY-SJ for submit@debbugs.gnu.org; Thu, 16 Sep 2021 05:46:18 -0400 Received: from out1.migadu.com ([91.121.223.63]:37057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQnyA-0000s3-J4 for 50359@debbugs.gnu.org; Thu, 16 Sep 2021 05:46:16 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1631785572; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=l1BG7SqJ9jopQRULDRoJuwtszJ5w4cSIwejutiGBDDg=; b=VDR6iEJjNqcrioAgV9Q9htR0Oj1S5vcvfB6O2XF3PJq46jlNN0dBNFD4sI3aOsfW0052Pb i+TykrhZRQuDUuJaIxzBZQCgS/qprl8dFtG23Q5NQ8ghDtf31sPWG49xg2hJvwpU5KzBBB aHt+e2D88dGOvMGn+r9poqXBVtoe3bo= From: Sarah Morgensen References: <5d10dd1e65b0a65ada4a8102310c10de42f53e8d.1631290349.git.public@yoctocell.xyz> <44519ae5dfdf3702dc73903b80314a6a@mgsn.dev> <87sfy6rqw5.fsf@yoctocell.xyz> Date: Thu, 16 Sep 2021 02:46:10 -0700 In-Reply-To: <87sfy6rqw5.fsf@yoctocell.xyz> (Xinglu Chen's message of "Wed, 15 Sep 2021 13:59:22 +0200 (20 hours, 25 minutes, 52 seconds ago)") Message-ID: <86a6kcj1jx.fsf@mgsn.dev> 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631785630; 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=l1BG7SqJ9jopQRULDRoJuwtszJ5w4cSIwejutiGBDDg=; b=J3pZiDwUZX+LqPOrUOD1ImSoLyaGhzezZ+5Ok63ytpBeD5YvvEReCl8x3TYqcaz7+GMH+3 TfDcdhbZAoTSEjZzL/PlUrusqzXjDekIHTlF4eJ4ynvJNY+i0O8FDpqql9lpgDoV/w/foP kKQoWYvfYDLEwBbKwi19jlv2KmvMUyNigYCR5D2YmktiqmviS4vK6CLm442tybQpoh3cX7 VQi6m04X5ES8Bej6AKr2uh6mYpotH8UcNFzMKUY36QBFLhdcrKNfPpMiAtG5s14MIOYskF W9g6c15mH0bJkXQl3NsAaFT6E/5drO0DT5NnX1YKacDmOj1XBDSg5jMdJI7KIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631785630; a=rsa-sha256; cv=none; b=C39FTqHNMajPPdv+6cbPpyQm2l0Z+Y+xm0ISrhQwOBYdWyMSxtXCOmq+xqowkgk0kxIibO yZMdZxAVpj6mI3vm0K+Qyp5tp4nB32If0Dv79MdlxwR3jsvlrlMbRTAUHmHthlS6McW4IW DCTY0Ugo6gOgk7noCIy7GW0VKExXX1RipNGF00t9XXapnDcFaGeRlsiihEc2nd1Ui/5nml o9X+Iv6kN4loRkZparsMwYaVHE103MTKldiNdpdgrLSf1zES/m6e4hGuZLJJ6e5unj6Dej K1NrPh5AWR6fBVDN6R5Yr4kEkfFKj/C0uj2gRQuVIFpjvYzcNcb8qbK5LNcvEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=VDR6iEJj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=VDR6iEJj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: AEB9E1A884 X-Spam-Score: -1.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: fLhH+BXNNLL3 Hi, Xinglu Chen writes: > On Wed, Sep 15 2021, iskarian@mgsn.dev wrote: > >> Hi, >> >> September 10, 2021 9:21 AM, "Xinglu Chen" wrote: >> >>> * guix/git.scm (ls-remote-refs): New procedure. >>> * tests/git.scm ("remote-refs" "remote-refs: only tags"): New tests. >>> * guix/import/git.scm: New file. >>> * doc/guix.texi (Invoking guix refresh): Document it. >>> * tests/import-git.scm: New test file. >>> * Makefile.am (MODULES, SCM_TESTS): Register the new files. >>>=20 >>> Co-authored-by: Sarah Morgensen >> >> Overall this is looking good. Thank you for adding tests (for >> remote-refs as well!), much appreciated. It looks like you've done >> some good polishing. I see a few nits, which I'll point out in a >> separate email when I'm not on mobile. I'll also give it a good test. >> >> But... I've been thinking about the overall approach for a couple >> days, because I'm not very happy with the complexity of my heuristic. >> >> There can be a lot of weird tags in a repository--look at the one for >> xf86-video-intel for example. My heuristic attempts to capture the >> assumption that repostories tend to move from using "_" or "-" to "." >> but it does fail to account for moving to or from dates (because dates >> don't compare with normal versions). > > But if a repo moved from using versions to tags, or vice-versa, we still > wouldn=E2=80=99t know if say =E2=80=9C3.0.1=E2=80=9D is newer than =E2=80= =9C2021.03.02=E2=80=9D. We would have > to know when the =E2=80=9C3.0.1=E2=80=9D tag was created. You're right; I thought of that afterwards. > Maybe we could have a =E2=80=98release-tag-date-scheme?=E2=80=99 property= , that way we > could just try to match dates? That seems like it might be the only way to handle it in some cases (if they have both versions and dates with a "." delimiter). (Though, we are actually interested in the *lack* of a date scheme. If they use a date scheme now, other versions will be disregarded, so we're fine; but if they use versions now and used a date scheme before, the versions will be discarded.) >> I also realized that we are not using a very useful piece of >> information--the previous version/tag combo. I expect that in the >> vast majority of cases, the version delimiter for the newest version >> will be the same as the version delimiter for the last known version. >> (Perhaps the prefix as well?) Can we use this information to make our >> guesses better? What do you think? > > That sounds like a good idea. What should happen if the delimiter from > the previous version/tag combo is different from the one that the > =E2=80=98guess-delimiter=E2=80=99 procedure returns? Should the one from= the previous > version/tag combo take precedence. Consider: prefix :=3D 'tag-prefix or guess-prefix-from-current-version+tag or defau= lt delim :=3D 'tag-delim or guess-delim-from-current-version+tag or guess-de= limiter suffix :=3D 'tag-suffix or default This should cover: 1. Format stayed the same (including date formats) 2. Format changed from (git-version ...) to proper version This does not otherwise cover a complete change in format, such as "_" -> ".", date(-) -> version, or version -> date(.), for which I could argue requiring a manual update is reasonable. It also does not cover when the tags have both versions and dates with the same delimiter. Though it would be nice to see when such updates are available, is it worth some bogus results? Are false positives better or false negatives better? Unless you/we want to pursue one or both of the above changes now, the latest patch LGTM (modulo my nits). Thanks for your work, -- Sarah