From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#36371: guix build =?UTF-8?Q?--with-git-reference=3D=E2=80=A6?= Date: Tue, 25 Jun 2019 14:38:44 +0200 Message-ID: <871rzhon57.fsf@gnu.org> References: <87mui6rp9q.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44026) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfkk0-0007Zb-9P for bug-guix@gnu.org; Tue, 25 Jun 2019 08:40:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfkjz-0002a4-2h for bug-guix@gnu.org; Tue, 25 Jun 2019 08:40:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45328) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfkjy-0002Zq-Ug for bug-guix@gnu.org; Tue, 25 Jun 2019 08:40:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfkjy-0007dc-Dc for bug-guix@gnu.org; Tue, 25 Jun 2019 08:40:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87mui6rp9q.fsf@nckx> (Tobias Geerinckx-Rice's message of "Tue, 25 Jun 2019 11:24:33 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Tobias Geerinckx-Rice Cc: 36371@debbugs.gnu.org Hi! Tobias Geerinckx-Rice skribis: > bricewge on #guix informed me that there's no way to pass a git tag as > source transformation option. Indeed: > > =E2=80=98--with-commit=3DPACKAGE=3DCOMMIT=E2=80=99 > This is similar to =E2=80=98--with-branch=E2=80=99, except that it bu= ilds from > COMMIT rather than the tip of a branch. COMMIT must be a valid > Git > commit SHA1 identifier. Indeed: --8<---------------cut here---------------start------------->8--- $ guix build guile-gcrypt --with-commit=3Dguile-gcrypt=3Dv1.0.0 updating checkout of 'https://notabug.org/cwebber/guile-gcrypt.git'... guix build: error: cannot fetch commit v1.0.0 from https://notabug.org/cweb= ber/guile-gcrypt.git: unable to parse OID - contains invalid characters --8<---------------cut here---------------end--------------->8--- Internally, that uses the =E2=80=98git-checkout=E2=80=99 record type define= d in (guix git). What I would propose is to change =E2=80=98git-checkout-compiler=E2=80=99 s= o that it can determine with a simple heuristic like that of (@@ (guix swh) commit-id?) whether the string denotes a commit ID or a tag. WDYT? > - Why is the (extremely) git-specific =E2=80=98--with-commit=3D=E2=80=99 = option not > called =E2=80=98--with-git-commit=3D=E2=80=99? Was it intended to be mor= e generic than > it is now? Should the new option be =E2=80=98--with-reference=3D=E2=80= =99 as well? > That's pushing it a little far. And three questions in one; I'm > cheating. Things are named this way for simplicity; the only exception is =E2=80=98--with-git-url=E2=80=99 because =E2=80=98--with-url=E2=80=99 would= have been too vague. Ludo=E2=80=99.