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 GDv3HgKvL2Hm/AAAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 18:49:06 +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 qOKHGgKvL2EQDAAAbx9fmQ (envelope-from ) for ; Wed, 01 Sep 2021 16:49:06 +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 086B415B5E for ; Wed, 1 Sep 2021 18:49:06 +0200 (CEST) Received: from localhost ([::1]:36102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLTQ8-0001QC-Ut for larch@yhetil.org; Wed, 01 Sep 2021 12:49:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLTGq-0001bf-4h for guix-devel@gnu.org; Wed, 01 Sep 2021 12:39:28 -0400 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:53246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLTGn-0002ro-Ey for guix-devel@gnu.org; Wed, 01 Sep 2021 12:39:27 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id ogfL2500e0mfAB406gfLGH; Wed, 01 Sep 2021 18:39:21 +0200 Message-ID: <1e58de895f638d897ea89647344ef24c40ea3ec2.camel@telenet.be> Subject: Re: Can we find a better idiom for unversioned packages? From: Maxime Devos To: Liliana Marie Prikler , Sarah Morgensen , guix-devel@gnu.org Date: Wed, 01 Sep 2021 18:39:20 +0200 In-Reply-To: References: <8635qp1j6k.fsf@mgsn.dev> <473ea45f79b94ff04327f3fdf691dd8e4a85f7ba.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-mj9jc7AhBuCWU1jl7KCa" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630514361; bh=1mobKabwYrRATacjgp/EIrwdLnJIvZWWYcC6EN7ZY3k=; h=Subject:From:To:Date:In-Reply-To:References; b=oYSBFV3GA6V1y9qweyfXPjXOni4vxpUN7DMiALBpaFbEpxBgRsN7C7EO+aWA427ZJ v/+iMqozuUnKIyeaxwwgtJs4ncz1xSAvywfq02Edh4uOt108jYKxvGqmyIJQ5pswVa SHzysLJR+uLFiFYBe6HhYLgxlH2KNpJa4/xuWaQCGRDQ82zcDEnSuuNaeU6x4KaTOH CFPLAqtjhXlRokImQGxUNCgA0QeYjvl8toPZwl0R+JIG/lNEkKA192U0SuCntRC/Ky fv6mN/Zl53Uq/C6ctEhRe6LlLMhXNUrwYFM8dMQNUQ+/ZUgGnxRPfHM8ATX5wvpzSz gwNjuiTJr+8SQ== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630514946; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1mobKabwYrRATacjgp/EIrwdLnJIvZWWYcC6EN7ZY3k=; b=VkeZ0HAw6gw3+8vlr9n2DYSAYMMXN8ygWpPIb+Be1JT1jhccGUGpZFp8+XDHerpKzGpna8 LkSPROqDQWd6bzRyMlzcO52oem4HazZxyXsJWrHIZsMo8YfxnQAyE5bw6lonGaFyPJ97xK Whe/j8UTdGRZ1LwLRMQ24WxUo1hNLDMGXbiwKsvnHhNyI4NQylvcrNS9f+Nfts4NYP/Kj4 fMWWB6B7u0M6NQnd89Rwe5VhFuIvo+nYuorsto85Gtfz6AOm2fV+EUwhPLVAd2mU4dFpUt Bvi5kCVXACPYUmdzvL018pfkIg3blOIGWtjNcs/FJU9utT/t1Q6oJ83q8wWQBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630514946; a=rsa-sha256; cv=none; b=WOPFjOYY3hoav+M7NVBs0UJZy+cFHHvuIdFBejf448wHcvw6YXyN3Up1oQNpv/qX1WdHJb eu+/nO7gmnJLb6y+T5eP3VBpTxUIQblPAnOFogHcG0WoiiREgzwKu1s1zGl+u9hIPkfcuy fms5SJsyrvmshqkBFuNMc6qRJbK0qImb93EeXfUpcF5xh1dVrSdYOxJam7MZ7eakKRi7jZ Tw+xx08v1peicPN2PE354rK65Febb//MsmA44XB5WsSIcn/UAXre/tKkp8BbuWeNRE/dSV NZjepJwvp219Li9e+BEn0Wd+5uYJipuYC2Pep6ELzVRhCTswxp54Bc8bR3X+lA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=oYSBFV3G; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -4.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=oYSBFV3G; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 086B415B5E X-Spam-Score: -4.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: qmGJxfW+6Rsb --=-mj9jc7AhBuCWU1jl7KCa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Liliana Marie Prikler schreef op wo 01-09-2021 om 15:33 [+0200]: > Hi >=20 > Am Dienstag, den 31.08.2021, 23:20 +0200 schrieb Maxime Devos: > > Sarah Morgensen schreef op di 31-08-2021 om 12:57 [-0700]: > > > Hello Guix, > > >=20 > > > Currently, there are about 1500 packages defined like this: > > >=20 > > > --8<---------------cut here---------------start------------->8--- > > > (define-public sbcl-feeder > > > (let ((commit "b05f517d7729564575cc809e086c262646a94d34") > > > (revision "1")) > > > (package > > > [...]))) > > > --8<---------------cut here---------------end--------------->8--- > > >=20 > > > I feel like there are some issues with this idiom (in no particular > > > order): > > >=20 > > > 1. When converting between this idiom and regularly versioned > > > packages, the git diff shows the whole package changing because of > > > the indentation change. > If you are worried about that in a frequently changing package, you > could set both to *unspecified* or #f instead, which would cause any > reference to them in a string manipulation context to fail. I don't > think that such transitions are too frequent, though, as the point is > rather to discourage them where not absolutely necessary and to use > upstream releases instead. >=20 > > > 2. We cannot get at the source location for the definition of > > > 'commit' or 'revision'. This would be useful for updating these > > > packages with `guix refresh -u`. There is a proposed patch [0] to > > > work around this, but it *is* a workaround. > Other versioning idioms would also be workarounds, wouldn't they? >=20 > > > 3. Packages inheriting from it lose the definitions. For actual > > > fields, we have e.g. `(package-version this-package)`, but we have > > > no equivalent for these. > What purpose would extracting those serve however?=20 Not losing the revision is useful for things like , to be able to determine the old revision. (That's not about inheriting packages though.) > [...] > > To be used like: > >=20 > > (define-public sbcl-feeder > > (name "sbcl-feeder") > > (version (extended-version > > (base "1.0.0") > > (revision 1) > > (commit "b05f517d7729564575cc809e086c262646a94d34"))) > > (source > > (origin > > (method git-fetch) > > (uri (git-reference ...) > > (url ...) > > ;; git-reference needs to be extended to retrieve the > > commit from the version > > (version version))) > > (file-name (git-file-name "feeder" version)) > > (sha256 ...))) > > [...]) > >=20 > > That should address 1,2,3,4 and 5. > >=20 > > One problem with this approach is that most users of 'package- > > version' expect it to return a string. Maybe adding a keyword > > argument '#:full-version? #t/#f' defaulting to #f would work? > I think the bigger problem here is that you're moving bits meant for > the origin into the version only to be able to point to the version > from the origin. Even accepting that you could use "commit" or a > separate field to encode SVN/CVS revision numbers instead of hashes, > everything beyond the revision number is basically pointless from a > versioning scheme POV and only really useful to fetch the source code.= =20 > As Xinglu Chen points out, a commit hash encodes remarkably little on > its own. The commit is largely useless, ok. If the (first few characters of) the git commit/svn revision are removed from the version strings, it can be removed from the proposed extended-version. Otherwise, it would seem you wouldn't mind extended-version if it only had the 'base version' and 'revision' field (in the guix sense, not the SVN sense of revision), or am I misunderstanding here? Geetings, Maxime. --=-mj9jc7AhBuCWU1jl7KCa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYS+suBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pG+AQCz8/sQHh7LPUZYLtn3AJV5ptPZ 57knovsGAp8VSTSv5gEAsGAWfXTsfgBZLGT8uyfoI5hmueQA1+LtGMmcgDXdvAo= =4AxC -----END PGP SIGNATURE----- --=-mj9jc7AhBuCWU1jl7KCa--