From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cAKUHP7mL2GXYAEAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 22:47:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0LrkF/7mL2HILAAAbx9fmQ (envelope-from ) for ; Wed, 01 Sep 2021 20:47:58 +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 0BDEB1AC10 for ; Wed, 1 Sep 2021 22:47:58 +0200 (CEST) Received: from localhost ([::1]:42516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLX9J-0003u7-7K for larch@yhetil.org; Wed, 01 Sep 2021 16:47:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLWDU-0001dt-W5 for guix-devel@gnu.org; Wed, 01 Sep 2021 15:48:13 -0400 Received: from libre.brussels ([2a01:4f8:201:1044::1]:42306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLWDS-0006qW-46 for guix-devel@gnu.org; Wed, 01 Sep 2021 15:48:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libre.brussels; s=mail; t=1630525685; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=f0K5cCdNo6vA2zYiw+dcG1sPzWXDpBsgx0eFhBiZ1KA=; b=KAWlFojGgXoNTMEf4b6mrkrbKLfn4AtAz5UPrgtUoLk++BONuMUAaUT9MsvI+p5RC/coAq xDDZyB3a85Nbbc4DI0eqdorCTjnfKhP5D88uJ5HUKoH0AZM++Zx68lrf9tjNTubHHYDlkh ic/wVpIIUgZIbve5eGsCa3pytBeqgMo= MIME-Version: 1.0 Date: Wed, 01 Sep 2021 19:48:05 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: "Jonathan McHugh" Message-ID: <6c1542b14a505e797a6d605d63796833@libre.brussels> Subject: Re: Can we find a better idiom for unversioned packages? To: "Liliana Marie Prikler" , "Maxime Devos" , "Sarah Morgensen" , guix-devel@gnu.org In-Reply-To: <27af2d4efec4ced1e8411b1d993dbc8112d26cb7.camel@student.tugraz.at> References: <27af2d4efec4ced1e8411b1d993dbc8112d26cb7.camel@student.tugraz.at> <8635qp1j6k.fsf@mgsn.dev> <473ea45f79b94ff04327f3fdf691dd8e4a85f7ba.camel@telenet.be> <1e58de895f638d897ea89647344ef24c40ea3ec2.camel@telenet.be> Received-SPF: pass client-ip=2a01:4f8:201:1044::1; envelope-from=indieterminacy@libre.brussels; helo=libre.brussels X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 01 Sep 2021 16:47:24 -0400 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=1630529278; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=f0K5cCdNo6vA2zYiw+dcG1sPzWXDpBsgx0eFhBiZ1KA=; b=MsY6LcPum2952083Hvi67XT57UByhV4iXmNz1Wf2EcZjDRUFTOUuXlRu7Dyl3uPlBHjYk9 7khzOGNwV7iMeih4noFFWZ7q5B0XBlQaVXqpnubbhfoYZtltCNAT5WviamLvd42r2V+zID 1tC+g9z05Est5JwaI8rOlQLkYnMW89SPvzN1NwusMRXmk4FSBxzkz/rQZQsZhDDUebFlsl rPOwtwKumOBnwoDh39WOubnm4rVVuZ8M/qLHWp1rbFYARslOYhrlw2XZfefTPRM859o+db pZzYJrZ5mJ3ZYRhmfSeKAgS/rOMYckEpsWYcau/FdJiWDCB48hrCkQCuljRpOw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630529278; a=rsa-sha256; cv=none; b=rSs5v8mYUZvEND56xt3cbxn4cstucjlawp9zHDNLfRJ9kMkPotwk975kp8OHRVA7Ap0HkG VxnH5fl3b5bKUReD2zmG5Bn86bXtktKk/ZGOhY2OPtq1Cg0Xtz9MS0lij1Q/pvwVsuKYVw 7tgakysEd2ZFkdCK+wxhjuCCkBHm8+oj6iAC4cHDriOXAxJ7fdTQFl/WcEx343b8VI3dBK n/XQgHw7xyq/G/PGj35ZM7kcGF9nexa7BJ48MIfERTIhczscgRNBB2JlexnUcI7tspy+TY dPAZb0UGWkvghJQNdMGuxnxaeFMR1PDF/3Yxo8O/3H0HLqhLj8H7S4Dgj1WhQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=libre.brussels header.s=mail header.b=KAWlFojG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=libre.brussels (policy=none); 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: 1.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=libre.brussels header.s=mail header.b=KAWlFojG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=libre.brussels (policy=none); 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: 0BDEB1AC10 X-Spam-Score: 1.18 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2HYrOgK5X+bK September 1, 2021 8:35 PM, "Liliana Marie Prikler" wrote > Making our rando commit git versions look like such other distro > versions does come at a disadvantage though, particularly when we look > at it through the lense of someone not used to Guix' versioning scheme. > Instead of telling us "yeah, this is the Nth time we picked a rando > commit since the last release and this time it's de4db3ef", users > coming from such distros would assume "oh well, this is still good ol' > 1.0 with some more patches applied". So while the commit itself does > not give us any particularly useful information (unless you're that > person who uses this part of the version string to look the commit up > on hubbucket), especially not when thinking in the context of > versioning scheme, it does provide the existential information of "hold > on, this is not a release commit, it's something else" and might thus > direct users to be a little more attentive when they'd otherwise go > "yep, upstream considers this solid and Guix considers it even more > solid, so it's the solidest". Note, that this can be overcome both by > teaching/learning about it and by using a special sigil as mentioned > above. Perhaps a function revealing metadata based upon the version string would= allow more people get an overview without visiting hubbucket^1? Would that be any weirder and awkward for workflows than the command `gui= x download'? =3D> https://guix.gnu.org/manual/en/html_node/Invoking-guix-download.html Even better, highlighting the part of the string and launching an appropr= iate context in Emacs-Hyperbole > My personal answer to this might be a disappointing one, as in that > case I believe we wouldn't even need procedures like git-version to > form them, but could instead use - as > a mere convention like many more popular distros already do. If the > dash is overused for that, we could also use a different symbol, though > perhaps there's not that many on a typical US keyboard to reserve one > as a revision delimiter. # Apologies for being off topic The inclusion of that character '=C2=A3' on keyboards bothers me - Ive ne= ver seen anybody use it (though maybe I have some fuzzy memory with regar= ds to the Commodore 64). If it unfortunately is on an international band of keyboard classes consi= der it as a delimiter. Otherwise Im ripping out that button and never int= erfacing the number 3 again. ^1 Is that pronounced bouquet?=20 =3D> https://keepingupappearances.fandom.com/wiki/Hyacinth_Bucket =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan McHugh indieterminacy@libre.brussels > Am Mittwoch, den 01.09.2021, 18:39 +0200 schrieb Maxime Devos: >=20 >>=20Liliana Marie Prikler schreef op wo 01-09-2021 om 15:33 [+0200]: >> Hi >>=20 >>=20Am 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 >>>>=20Currently, there are about 1500 packages defined like this: >>>>=20 >>>>=20--8<---------------cut here---------------start------------->8- >>>> -- >>>> (define-public sbcl-feeder >>>> (let ((commit "b05f517d7729564575cc809e086c262646a94d34") >>>> (revision "1")) >>>> (package >>>> [...]))) >>>> --8<---------------cut here---------------end--------------->8- >>>> -- >>>>=20 >>>>=20I feel like there are some issues with this idiom (in no >>>> particular >>>> order): >>>>=20 >>>>=201. 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 >>>>=202. 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 >>>>=203. 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 >>=20Not losing the revision is useful for things like >> , to be able to determine the old >> revision. (That's not about inheriting packages though.) >=20 >=20Isn't that addressed by addressing the second point, though? Like, if > you know the source location of the revision, you can read it back to > get the value itself (or possibly even access it as-is), no? >=20 >>=20[...] >>> To be used like: >>>=20 >>>=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 >>>=20That should address 1,2,3,4 and 5. >>>=20 >>>=20One 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. >> As Xinglu Chen points out, a commit hash encodes remarkably little >> on its own. >>=20 >>=20The 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. >>=20 >>=20Otherwise, 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? >=20 >=20That was not my suggestion, but let's entertain the idea, shall we? I= n > that case, we would discard the commit part from the version field, > which might not be everyone's tea, but I'm more or less indifferent as > to whether to include the hash there or not =E2=80=93 after all, even i= f it was > lacking, we'd quickly get it through inspecting the package > description. If we simply didn't capture the hash at all except inside > the commit field of the origin, we would gain 1, 4 and 5 so the > question is whether we should have an extended version so as to update > the revision more easily... >=20 >=20My personal answer to this might be a disappointing one, as in that > case I believe we wouldn't even need procedures like git-version to > form them, but could instead use - as > a mere convention like many more popular distros already do. If the > dash is overused for that, we could also use a different symbol, though > perhaps there's not that many on a typical US keyboard to reserve one > as a revision delimiter. >=20 >=20Making our rando commit git versions look like such other distro > versions does come at a disadvantage though, particularly when we look > at it through the lense of someone not used to Guix' versioning scheme. > Instead of telling us "yeah, this is the Nth time we picked a rando > commit since the last release and this time it's de4db3ef", users > coming from such distros would assume "oh well, this is still good ol' > 1.0 with some more patches applied". So while the commit itself does > not give us any particularly useful information (unless you're that > person who uses this part of the version string to look the commit up > on hubbucket), especially not when thinking in the context of > versioning scheme, it does provide the existential information of "hold > on, this is not a release commit, it's something else" and might thus > direct users to be a little more attentive when they'd otherwise go > "yep, upstream considers this solid and Guix considers it even more > solid, so it's the solidest". Note, that this can be overcome both by > teaching/learning about it and by using a special sigil as mentioned > above. >=20 >=20All in all, I don't think putting too much "opinion" in the version > field by storing it as a record is a good idea. It's fine if it's just > a string that can be parsed/version-compared. We could also make it a > list like Emacs does and like we use internally, though I'm not too > certain of what the benefit of that would be at the cost of breaking > pretty much everything (and probably putting in some opinions as to > what is to be delimited by dots and what by dashes). >=20 > Regards