From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oImFHnHgQWFzgAAAgWs5BA (envelope-from ) for ; Wed, 15 Sep 2021 14:00:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2LQ6GnHgQWE+VgAA1q6Kng (envelope-from ) for ; Wed, 15 Sep 2021 12:00:49 +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 432011ED64 for ; Wed, 15 Sep 2021 14:00:49 +0200 (CEST) Received: from localhost ([::1]:43732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQTaq-0007dd-5z for larch@yhetil.org; Wed, 15 Sep 2021 08:00:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQTa6-0007d9-D1 for guix-patches@gnu.org; Wed, 15 Sep 2021 08:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQTa6-0003eS-40 for guix-patches@gnu.org; Wed, 15 Sep 2021 08:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQTa6-0008GY-1A for guix-patches@gnu.org; Wed, 15 Sep 2021 08:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50359] [PATCH 3/3] import: Add 'generic-git' updater. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Sep 2021 12:00:01 +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: iskarian@mgsn.dev, 50359@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 50359-submit@debbugs.gnu.org id=B50359.163170717631714 (code B ref 50359); Wed, 15 Sep 2021 12:00:01 +0000 Received: (at 50359) by debbugs.gnu.org; 15 Sep 2021 11:59:36 +0000 Received: from localhost ([127.0.0.1]:51174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQTZf-0008FS-Ko for submit@debbugs.gnu.org; Wed, 15 Sep 2021 07:59:35 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:55490 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQTZe-0008FG-Gz for 50359@debbugs.gnu.org; Wed, 15 Sep 2021 07:59:35 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1631707166; bh=ZX+NNxys7tt8H0ouS4ghq4wpDvK3m7uJ8o1mi9v3u2U=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=lu6s1iYmRv9l0rnC5t6Kp55+Wt7/bx63x9/mxrGxAgWr78LZi2/zMXEKkbRjbs3oj SzaxF6CyB9VH5IaWFFK/Yb4xsatvi7EVYNxFcrHKbv/cOjP4cE3TR5n3RKOyBgWq4U oJ9FQ2FDqkxiKScu9T8mhYdTBqLrRH+O8BXmgePM= In-Reply-To: <44519ae5dfdf3702dc73903b80314a6a@mgsn.dev> References: <5d10dd1e65b0a65ada4a8102310c10de42f53e8d.1631290349.git.public@yoctocell.xyz> <44519ae5dfdf3702dc73903b80314a6a@mgsn.dev> Date: Wed, 15 Sep 2021 13:59:22 +0200 Message-ID: <87sfy6rqw5.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 432011ED64 X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: mqTB6+8QO9qX --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. Maybe we could have a =E2=80=98release-tag-date-scheme?=E2=80=99 property, = that way we could just try to match dates? > 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 t= he previous version/tag combo take precedence. > Despite saying all that, it's probably better to not try to get it > perfect on the first go--we can always adjust the internals later. We > just want to avoid showing bogus updates. Yeah, we can always improve things later. =20=20 > (Later, I think I'll put together a dataset of tags and current > versions to see if I can test how well a particular algorithm works.) Cool, looking forward to that. :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFB4BoVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5F/sQAKkyjf7qyW/HkRcAfoZG3oGyTfLi 5DNEy2XtqrxV07gZNy9pJOhdz+x+utSchutn33xRjJLo0N5eg9uj9FNTyjVsTpMV 6P31JCLU3fB6fQZiStONuHTksTLP3YrKoNMR31BYRCQ7EQ6EysxAbCLApcz/E+vn jHQvPcLxIeZj4NfTw9qH3jCpk3JKEn+fyEu50H/XXxE/loXVXCSGxP1aWKSCo0Ii +TpFS6CSYLCHjxW5M0j0JOVrFliFhqUV3L+EKr6ooTDt0FmZyWf1/iD5DBH9D+Vm 0iD8wiZ0sjRRqL8955en44NnEU+g63iTBdR3UvX8pOLQZn/SbBHLzQdi3Gpvx2HF BTvEm3wmsRQlt18e5yyn43wmxofJfksQI6/sYEF8ULDWzqC3rKiZL1r7Vt2+I9pn 1vW7YC8Zy9mYWYx9vDdWai8i9ltIrxXkSSZKmiLXDlNB0cq1LSDoQv4OQXmuUiMA rcilETL3RNT1RdeFGGzPhmTHEHlMnpZG1ZCtgUiG8tjJkRRSz2fvL25M09i89SLK 9pLGUYwXoYJeykQ7rhcUnLPekHzPveC+AnY7JbpFwpXqlVI7wTNceVG4NXXxjEY0 vRxNiMGrSwPg1K7uRTDangD5rLFndt7nq5ANhUj1B4p30jiemoWwQM5xJsAO3ER0 b1afQNrw2MAsEgk3 =5CXA -----END PGP SIGNATURE----- --=-=-=--