From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0BecK07sNWEDBAAAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 12:24:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mAWBJ07sNWECKQAAB5/wlQ (envelope-from ) for ; Mon, 06 Sep 2021 10:24:14 +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 0D9FC11532 for ; Mon, 6 Sep 2021 12:24:14 +0200 (CEST) Received: from localhost ([::1]:56406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNBnR-0002fY-6L for larch@yhetil.org; Mon, 06 Sep 2021 06:24:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNBnG-0002f8-6G for guix-patches@gnu.org; Mon, 06 Sep 2021 06:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNBnF-0005nS-Uj for guix-patches@gnu.org; Mon, 06 Sep 2021 06:24:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNBnF-0008UH-RP for guix-patches@gnu.org; Mon, 06 Sep 2021 06:24:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 10:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50072 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: Sarah Morgensen , Xinglu Chen , 50072@debbugs.gnu.org Received: via spool by 50072-submit@debbugs.gnu.org id=B50072.163092381832585 (code B ref 50072); Mon, 06 Sep 2021 10:24:01 +0000 Received: (at 50072) by debbugs.gnu.org; 6 Sep 2021 10:23:38 +0000 Received: from localhost ([127.0.0.1]:52025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNBmo-0008TR-Uj for submit@debbugs.gnu.org; Mon, 06 Sep 2021 06:23:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNBmn-0008TD-RL for 50072@debbugs.gnu.org; Mon, 06 Sep 2021 06:23:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34512) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNBmg-0005Lu-18; Mon, 06 Sep 2021 06:23:26 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47198 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNBmf-0005sm-Oj; Mon, 06 Sep 2021 06:23:25 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@mgsn.dev> <86fsv9jh8h.fsf_-_@mgsn.dev> <7986923ce7712dc341e859e62675abee12072922.camel@telenet.be> Date: Mon, 06 Sep 2021 12:23:23 +0200 In-Reply-To: <7986923ce7712dc341e859e62675abee12072922.camel@telenet.be> (Maxime Devos's message of "Tue, 17 Aug 2021 12:18:28 +0200") Message-ID: <87k0ju80kk.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 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=1630923854; 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; bh=T6fT1CNQaN2DT5r1jx5QCEfM3G2Zs1d6feLny0zH5ts=; b=AbgK2pqv9MZcq54KSMykOhCI10fN4QkznIwbjVk62DtyzJvZ3mnVrp5MjP+No0z/RP0uKv W/6Dta5IEV1NgS+9Bry0kGYsuThqIknx392AY3QxNVhMXMiyTj1SmwPf9qS8AbGTkGgdHi UCgOc0rgYuhnEk0IsUWIQVXUDoTjbdHJ5f18crlattwkyHyml1+uWdIR6hvjz9szf4muG7 79xQmN/ag3bPL1duu2j889TTt4hSXQRAqd81NH0fJZgNB15EC5Ct7tMeCfvuckceI1aeml kfeXKYaewtcDMf0j6GogXKOxTrK8cp0XNoXSnCPy6PYZoTDSpefcqlBhFkbqvA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630923854; a=rsa-sha256; cv=none; b=H3TDkJyqLjVUP9rHj9ixPrZR2DoAlz2MfJEppLwM0lg2BoJZKqjt0+1kORK1DgIPcs/YcV hMcnL/EqT2FdumOe6cdzc/STm06SCs5fKSk45ARZvE7MWfqgB6mNsIbK70RpDjoB132KlL rM+CbU/dc/FCb3AqhBBDoiZiVfeKE9QNG8KjbMWf3h2T70QEsrl2GEIBcacxRIMO25iLa2 0OIajeoIKXrz4/rSypilD+0xkkOYJYwKOmniUmWWIe8yNmo1LyqCd2qKHhNgrRmdoXDU/X WHi3ZvrsGdjijZpbqy5SwbH/3WVbsKngLRVYDE26EzKYVIzmd25KzROBRdPSbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 0D9FC11532 X-Spam-Score: -2.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: YlhaoQKNOF1H Hi, Maxime Devos skribis: > Sarah Morgensen schreef op ma 16-08-2021 om 12:56 [-0700]: >> Hi Maxime, >>=20 >> Thanks for taking a look at this. :) >>=20 >> Maxime Devos writes: >>=20 >> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]: >> > > * guix/git-download.scm (checkout-to-store): New procedure. >> > > * guix/upstream.scm (guess-version-transform) >> > > (package-update/git-fetch): New procedures. >> > > (%method-updates): Add GIT-FETCH mapping. >> >=20 >> > Does it support packages defined like (a) >> >=20 >> > (define-public gnash >> > (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4") >> > (revision "0")) >> > (package >> > (name "gnash") >> > (version (git-version "0.8.11" revision commit)) >> > (source (git-reference >> > (url "https://example.org") >> > (commit commit))) >> > [...]))) >>=20 >> No, it doesn't. Since the commit definition isn't part of the actual >> package definition, the current code has no way of updating it. It >> would require a rewrite of the edit-in-place logic with probably a lot >> of special-casing. > > Perhaps a 'surrounding-expression-location' procedure can be defined? > > (define (surrounding-expression-location inner-location) > "Determine the location of the S-expression that surrounds the S-expres= sion > at INNER-LOCATION, or #false if the inner S-expression is at the top-leve= l." > ??? Something like 'read', but in reverse, maybe? > Doesn't need to support every construct, just "string without escapes" = and > (parentheses other-things) might be good enough in practice for now) > > Seems tricky to implement, but it would be more robust than relying > on conventions like =E2=80=98the surrounding 'let' can be found by moving= two columns > and two lines backwards=E2=80=99. Or see another method (let&) below tha= t is actually > implemented ... I think we can work incrementally. It wouldn=E2=80=99t be unreasonable to = start with a =E2=80=98definition-location=E2=80=99 procedure that would work in a= way similar to =E2=80=98package-field-location=E2=80=99 (essentially =E2=80=98read=E2= =80=99 each top-level sexp of the file and record the location of the one that immediately precedes the package location.) But maybe the discussion in will give us something nice. Thanks, Ludo=E2=80=99.