From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UDKuKXNvL2G1dQAAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 14:17:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6H1bJXNvL2FFNAAAB5/wlQ (envelope-from ) for ; Wed, 01 Sep 2021 12:17:55 +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 16E5EF2C7 for ; Wed, 1 Sep 2021 14:17:55 +0200 (CEST) Received: from localhost ([::1]:36318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLPBi-0006j2-5f for larch@yhetil.org; Wed, 01 Sep 2021 08:17:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLP68-0007Ge-JT for guix-devel@gnu.org; Wed, 01 Sep 2021 08:12:08 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:51040 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLP66-0005ez-P5 for guix-devel@gnu.org; Wed, 01 Sep 2021 08:12:08 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630498320; bh=kE24TkDPwlsBWVVjsEa+Tu4A8FNgjm+FXarIcc3fFKI=; h=From:To:Subject:In-Reply-To:References:Date; b=McRKlMviS+5bkPh+hpB7ji4xGX3pbTe7cPccxv07sazke76/UCm4Bj7iNdTbSe84M ca1Xl5MEYYP9g7Wg2yCabJhYjAOZqdfjaa7/x4cZOAJrfrIZATzn97VZBR43YvuO8f bszt6s0ZeQahKh4Z8/aWEQPbw4RJIOwJeHESVxsU= To: Maxime Devos , Sarah Morgensen , guix-devel@gnu.org Subject: Re: Can we find a better idiom for unversioned packages? In-Reply-To: <473ea45f79b94ff04327f3fdf691dd8e4a85f7ba.camel@telenet.be> References: <8635qp1j6k.fsf@mgsn.dev> <473ea45f79b94ff04327f3fdf691dd8e4a85f7ba.camel@telenet.be> Date: Wed, 01 Sep 2021 14:11:59 +0200 Message-ID: <8735qolckw.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 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, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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=1630498675; 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=PSmxFNuOMy70qNOrqt/5VU0KEF9Yy0hbzO3CH9vdis4=; b=hRaAuMgaLVTIuWvhDcFbBzZZT+X1IPE3/Rjvq7nqTT3IGnoI6MEShthjlnrbiAd2N27q0f cq6O01sxtlaBvvF7G2vGE8ZhQ3VqKu0vYaF0UIdapzlQCSBA4VJBApypKInuWjyc+fCuPU BPC9WM3ot+NeXQT2XOoJ4tVjSAsyIR9CYAoxDMEYtXPYFBM9v+1IVd7tqr1/ua04/Eb5kc EEj6xv2YbNgXAjbP0rCY2q0RFCtNnUqFFtv7khRcehjdHQg6iTmVT+TwPnmYElB3ARHSnR zTKsQGRDi4hsyp8UMFEC1J1TKw3HiJXIbO4qeXF516XPlW2W5ZWilHqNVpQung== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630498675; a=rsa-sha256; cv=none; b=hM9Nwdm4hSUWEID6/tmcyfS+h/yyBT7WtBXGInwzwnpTmaWPdCozkenEGIZd9G51ENe+Ex 2HzcbLZvkkJNxAL9eMMpCNxebGA2fTLSx42p6DSNZ/MgufinGWGwO7vljNlYTkHnjXDW7t ze+lfGi6oSIMhT3wLseH9G9YaQLPUAFxTx/my5xrM1znHEZCpoiWLzCWJRxPUSJ6xMsqlJ cNoi72GwVq4RIqMhUP6SFbpXA/kSQ6mQfzeGDHZu79tahnnaHlbdMex1QjpFbX8BhFa5lq 5bOnFec+SkYW7WGCSx6sfAYWpAU+Xviys0WJQDflMJ/+0TuN3TKQE7ms2YTprA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=McRKlMvi; dmarc=pass (policy=none) header.from=yoctocell.xyz; 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=yoctocell.xyz header.s=mail header.b=McRKlMvi; dmarc=pass (policy=none) header.from=yoctocell.xyz; 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: 16E5EF2C7 X-Spam-Score: -4.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: Lm8IkzM+kbta --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Aug 31 2021, Maxime Devos wrote: > 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. >>=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. >>=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. >>=20 >> 4. Horizontal space is at a premium, and an extra two spaces here and >> there add up. (Personally, I think we could do with a >> define-public-package macro to save another two spaces, but that's for >> another day...) >>=20 >> 5. The closest thing we have to a standardized way of generating >> versions for these packages is `(version (git-version "0.0.0" revision >> commit))`. We can do better than that boilerplate. > > Suggestion: extend the 'version' field. More specifically, > introduce a new record , like this: > > (define-record-type* extended-version make-extended-ve= rsion > extended-version? this-version > ;; something like 1.2.3 (TODO better name) > (base extended-version-base) > (revision extended-version-revision) > (commit extended-version-commit)) > > (define (version->string version) > (match version > ((? string?) version) > (($ ...) code from original git-version and hg-ve= rsion))) > > ;; TODO: > ;; adjust git-file-name and hg-file-name to accept rec= ords > ;; (as well as the =E2=80=98old style=E2=80=99 for compatibility) > > To be used like: > > (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 f= rom the version > (version version))) > (file-name (git-file-name "feeder" version)) > (sha256 ...))) > [...]) How will this work for SVN and CVS? I am not familiar with either, but I know that SVN has its own =E2=80=98revision=E2=80=99 thing. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEvbg8VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5YToP/j7RqTEsCLItgD5Qypr6Zi6BBGvR Jlcdz8bQ5n0C2dXIIo92xgjj64zruHGhjggMo3hA1pr7OXaTW1uvpOGTsg8+JXnI x/YRnAlmoHACgaxozcHvewES3O41eaxOGiwyBPdsa5w0zK/wJP00acLVuYrai2B3 ykYwmdw/gB0LOGQHFfIz5uzozsjYBVCU7bp2bufbvqRusjrxj6tgw5/M8MXphlzO PEERso0IJxlveKARtpStKWl1fSeT/TbE2hL+LBEZ/eysf6ZmlMZVjSV4xmnwuLHy fT8JzD02L518YO0LYMlytwkdX2nmdR9be22zGJVNVPVyWZKkMbcUS6vsk7HbrVE1 way5On/KzEbx8X+buwIRtnHYsgCRGDlVJ3k8Al+SD4W4QFvZnIHfG3mNGA/ebvvO LLkk75TFsz8EHho1/msqtzS+Ksp/ayCFTeNVet6y3+Jx7jCaNGYp7QhVwvaZiWrd ENChjyU+EQUa1SX/DADscVKporJjBpk9tT5SwMgv40Kqo2JRb05Fnq+IXnd8m3O5 eQMXfCBcdWIycaEQHDxjPycXEq12AqHKRX2b+psNAZ0bqwC2U2tga7BBm4XGsegv SiKHCjLM2BfTZB9NcEfF6GXF9CXov7Ys213mh8JdofH77nv71/gyhf9irEYF5oqy mOWz+srr+Iz4DiMH =mJiY -----END PGP SIGNATURE----- --=-=-=--