From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iDa/NuqrimFoNwEAgWs5BA (envelope-from ) for ; Tue, 09 Nov 2021 18:12:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mL1KMuqrimHiBAAAbx9fmQ (envelope-from ) for ; Tue, 09 Nov 2021 17:12:10 +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 50D9BF713 for ; Tue, 9 Nov 2021 18:12:10 +0100 (CET) Received: from localhost ([::1]:54246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkUfJ-0002Jb-EQ for larch@yhetil.org; Tue, 09 Nov 2021 12:12:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkUfC-0002JM-F6 for bug-guix@gnu.org; Tue, 09 Nov 2021 12:12:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkUfC-0006mI-5h for bug-guix@gnu.org; Tue, 09 Nov 2021 12:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mkUfB-0006WD-Ni; Tue, 09 Nov 2021 12:12:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#51726: SWH: =?UTF-8?Q?=E2=80=98lookup-origin-revision=E2=80=99?= can miss tags Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: zimon.toutoune@gmail.com, bug-guix@gnu.org Resent-Date: Tue, 09 Nov 2021 17:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51726 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 51726@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org X-Debbugs-Original-Xcc: zimoun Received: via spool by submit@debbugs.gnu.org id=B.163647787424999 (code B ref -1); Tue, 09 Nov 2021 17:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2021 17:11:14 +0000 Received: from localhost ([127.0.0.1]:35577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkUeQ-0006V9-1v for submit@debbugs.gnu.org; Tue, 09 Nov 2021 12:11:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:55340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkUeK-0006Uw-RN for submit@debbugs.gnu.org; Tue, 09 Nov 2021 12:11:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkUeK-0001si-Mz for bug-guix@gnu.org; Tue, 09 Nov 2021 12:11:08 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:14664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkUeG-0006Q9-5R for bug-guix@gnu.org; Tue, 09 Nov 2021 12:11:08 -0500 IronPort-Data: A9a23:uPbQEa1HqMWfzSPydPbD5fdzkn2cJEfYwER7XOPLsXnJ02931zBTyWBOX2uAPf7cZmOgeNlzbI+1/BhSvJSAnN82QQE+nZ1PZyIT+JCdXbx1DW+pYnjMdpWbJK5fAnR3huDodKjYdVeB4EfyWlTdhSMkj/jRH+KtULSs1h1ZHmeIdg9w0HqPpMZp2uaEsfDha++8kYuaT//3YDdJ6BYoWo4g0J9vnTs01BjEVJz0iXRlDRxDlAe2e3D4l/vzL4npR5fzatE88uJX24/+IL+FEmPxp3/BC/u/k7zxdUtirrz6bFHI0yQOHfH73V4Y/nVaPqUTbZLwbW9TljmOgdF6jt5KqIasRBwBP6vWme1bXQMw/yRWZ/0XoOKdfBBTtuTWlSUqaUDEyehhSU4rPJ0w9eBqR2ZU+pQlxJolBvyYr7PvhevlEqw135tmdpGyepgCsGom1SveHf8qB5bOX833CRZj9G9Yrqhz8Tz2PKL1sQZSUSk= IronPort-HdrOrdr: A9a23:6PQXaKp47q/KH53/v6xw8NgaV5omeYIsimQD101hICG9E/bo8PxG+c5w6faaskdzZJhNo7C90cq7IE80l6QFg7X5VI3KNGLbUQCTXeRfBOXZslnd8u7FmtK1F50MT0GzMrLN5JFB4/rH3A== X-IronPort-AV: E=Sophos;i="5.87,220,1631570400"; d="scan'208";a="2890525" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2021 18:11:00 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 Brumaire an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 09 Nov 2021 18:11:00 +0100 Message-ID: <87mtmdi7a3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636477930; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VAUfx1ReGR3gqJh47do+/b9XRi/S1C13Vd9EclO8aok=; b=hd2P4rgsFuJk8hPTmSKufXKOaUZo1606BeFzPEFZvS54moGEkVJBnmEFczmtc46m2C2xKL UugZgcvBu/OaBRbjr+VxXbc3FXYrnhG7p6p0+UA8sfQBjxVTCsalvzll6AEL2mVBZJTCBl TG9xC7l7aQMdH0TBYfIjj+zSWWzz9lXkfXokoIGtb3fXcYQAlE8FqQ4uyk5NTm3M8Gs1p0 iEyPgc0PscputwJpucHJ5xVBzZWexeg0i3/BN+Lqp/zT61bGOkAnaGPgxnZy/2W1RtUsPp yMGvDNl/3659ePExidt5U7UPvJS4VXjtl5TlmMjDh5h7pmR/7iB+cWsMWV+I8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636477930; a=rsa-sha256; cv=none; b=jIG4IHiEoifTNRL59AYecnWhsBi9K/tDoMA6p+6WCXyCYIyiQKvTEkaR28yaU5FdhjpoCu nBzaJlaps/yge7rn40dd/DVG8Gb6Yav7PjqoGgHXO/smVEcGeOOFj93f3WmM1KbUQRCtQv Az5omOBDNlAyu7iKAi5Z5PNATY/0uH4VKmkVqgcsJzcz7fq6mci2+3iiDtiJCBQv1TIaF/ vj6mkPeVlqI716RpAZARPzMafRZPlOnp/JHU8rJvdZpZgxQq7w6yg3GWy6IrLn6gw3Iod8 YouilMMF3OInMzhOQ0+yOZ9JJUXxmxsOt4iY37+Na0PR32TzxT76IeDpGa/89g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 50D9BF713 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: MoenNrEsJxCg Quoting : --8<---------------cut here---------------start------------->8--- > However, I get this: > > $ guix lint -c archival sway=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 > gnu/packages/wm.scm:1527:5: sway@1.5.1: scheduled Software Heritage archi= val Indeed, I=E2=80=99m getting that as well. Right now Sway=E2=80=99s origin refers to the =E2=80=9C1.5.1=E2=80=9D tag. I found the problem: scheme@(guile-user)> ,use(guix swh) scheme@(guile-user)> (lookup-origin-revision "https://github.com/swaywm/swa= y" "1.5.1") $2 =3D #f scheme@(guile-user)> (lookup-origin "https://github.com/swaywm/sway") $3 =3D #< visits-url: "https://archive.softwareheritage.org/api/1/o= rigin/https://github.com/swaywm/sway/visits/" type: # url: "ht= tps://github.com/swaywm/sway"> scheme@(guile-user)> (car (origin-visits $3)) $4 =3D #< date: # origin: "https://github.co= m/swaywm/sway" url: "https://archive.softwareheritage.org/api/1/origin/http= s://github.com/swaywm/sway/visit/41/" snapshot-url: "https://archive.softwa= reheritage.org/api/1/snapshot/10ba0257e3290ce4504c2413f32b9358d72975d6/" st= atus: full number: 41> scheme@(guile-user)> (define s (visit-snapshot $4)) scheme@(guile-user)> ,pp (map branch-name (snapshot-branches s)) *** output flushed *** scheme@(guile-user)> (length (snapshot-branches s)) $6 =3D 1000 scheme@(guile-user)> (filter (lambda (b) (string-prefix? "refs/tags" (branch-name b))) (snapshot-branches s)) $7 =3D () scheme@(guile-user)> ,use(srfi srfi-1) scheme@(guile-user)> ,pp (take (snapshot-branches s) 10) $8 =3D (#< name: "refs/pull/2715/head" target-type: revision target= -url: "https://archive.softwareheritage.org/api/1/revision/2f258eff6fd2c89a= 94caa658c1ea22beb76d728a/"> #< name: "refs/pull/2713/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/4e4898e90f4d9b721091137= a744deac335e73f12/"> #< name: "refs/pull/2712/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/d129108cddc485299443d0b= 98c3bdf3f9839aa1c/"> #< name: "refs/pull/271/head" target-type: revision target-url: "h= ttps://archive.softwareheritage.org/api/1/revision/20cb390323b19dc0c767ba63= 925def7f51c31044/"> #< name: "refs/pull/2709/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/426c33f4dc2515867a0d3b0= 4cb865d5cad091d10/"> #< name: "refs/pull/2708/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/b1a0e95e8e6ecf66542cc62= e6109949de59afb5e/"> #< name: "refs/pull/2704/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/6194a445d3b10e8afc96871= 2faccdd1d127a8beb/"> #< name: "refs/pull/2703/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/f16529e2588f5e71d6777f4= c06dfb58b29308cd0/"> #< name: "refs/pull/2701/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/baeb28ea6230ef9aa409ee5= 2abe208720120e45c/"> #< name: "refs/pull/270/head" target-type: revision target-url: "h= ttps://archive.softwareheritage.org/api/1/revision/a32cbb52ce81ee38d2928ba8= 73ff7fc182df8393/">) This snapshot has more than 1,000 branches, mostly =E2=80=98refs/pull=E2=80= =99 branches. But by default, the endpoint used by =E2=80=98visit-snapshot=E2=80=99 only = returns the first 1,000 branches, and then it=E2=80=99s up to the caller to use the pagination mechanism. It=E2=80=99s not implemented though! It turns out the =E2=80=98refs/tags= =E2=80=99 =E2=80=9Cbranches=E2=80=9D were not among the first thousand branches, so the code incorrectly thinks that the tag is missing. The solution is to implement pagination (yuk!), or to use an endpoint to look up a branch by name instead of using =E2=80=98snapshot-branches=E2=80= =99 (is there such an endpoint?). --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99.