From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6UknGb+JLmFnPwAAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 21:57:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +LrtE7+JLmEUAgAAbx9fmQ (envelope-from ) for ; Tue, 31 Aug 2021 19:57:51 +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 E779F1CEAF for ; Tue, 31 Aug 2021 21:57:50 +0200 (CEST) Received: from localhost ([::1]:41798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL9tF-00078L-S3 for larch@yhetil.org; Tue, 31 Aug 2021 15:57:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL9sz-00077r-CD for guix-devel@gnu.org; Tue, 31 Aug 2021 15:57:33 -0400 Received: from out2.migadu.com ([2001:41d0:2:aacc::]:57086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL9sv-0004Uu-NZ for guix-devel@gnu.org; Tue, 31 Aug 2021 15:57:32 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1630439845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=aK0lerrsEKrqpHf3rPaVTR/RNwXUrTuhUlp5QS02NY0=; b=Mybt0RQWqSgwZZtnGuZ4DGMUSoWwPjzwzqbnoags4qK0SF0T643Aegt/GOjWCntkjS+i+N z6HFP/GlEGxWF6aQSLyrolo6ja3gDOhD3eVPAxINntdEjASVMTPjV2OVpDYy3NJ41C49WO b4UwIm8/oTzX7r5HDyXLVhTb0EAfU+o= From: Sarah Morgensen To: guix-devel@gnu.org Subject: Can we find a better idiom for unversioned packages? Date: Tue, 31 Aug 2021 12:57:23 -0700 Message-ID: <8635qp1j6k.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: iskarian@mgsn.dev Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=iskarian@mgsn.dev; helo=out2.migadu.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=1630439871; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aK0lerrsEKrqpHf3rPaVTR/RNwXUrTuhUlp5QS02NY0=; b=OQFV/HqZ+QwK7EAG1SUW05zALbm643Jvmq0h4KQhU6BTTtb1P0paF62TSu+AorYJzWSQ46 kB9Dk8oqj4cP3QpGURPDvBfXlgnMVWXJihpUzu2cLLPHAurdWZYn0ocT4mRpIEVSR8+ywV 6Yj0LHVP7VyX5NxINdJ4sdmdO3nivZUxfeJgmm4Iy1m0kr14/3/Mu5aq9as3TXa+/Q5WHh cRp+KlLmUDJcST/qiW7DOVdS/da8jKtJwr0YTgkhOJmRUe8ekVD6+OetoqsC1UJXOVxUhZ 3ImvgadzaWgrmXPpLIqd07uaS3ACdwyuL4Qrht2uMICB5wxUSswwnu3GSiz4hQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630439871; a=rsa-sha256; cv=none; b=of4Zda5PwHk5MUVt4rkisCIYTYCPA/iSe+Kdp1NvV7JjQXx17KU9nYyWz3LrWpsizFtxB1 0603ZceSR3L5eLxz2oFiEdH8zAreMQI3ATE8u98o3s9zMKgnf724ryoe0vqUKeyc2T7a5f iwPez0ieIMuHC4GJumlW/CPR+pWk0PERUKQ5CeCZz6rdPgx3enI8ejHTUECid0q5V0/wFD LOlThcGePxPga2KCdYkVyCyjVU26uJLfeso9UsOLG67K9IVBo2GjigN3qo71/QS8FuGfwb 3rCUW3xDQv+pYCEwtABNRISwooQuTcECKoveqMzGht4Z35MW7vCjRJcLwFM/+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mgsn.dev header.s=key1 header.b=Mybt0RQW; dmarc=pass (policy=none) header.from=mgsn.dev; 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: -2.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mgsn.dev header.s=key1 header.b=Mybt0RQW; dmarc=pass (policy=none) header.from=mgsn.dev; 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: E779F1CEAF X-Spam-Score: -2.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: SaM5ml7woLpE Hello Guix, Currently, there are about 1500 packages defined like this: --8<---------------cut here---------------start------------->8--- (define-public sbcl-feeder (let ((commit "b05f517d7729564575cc809e086c262646a94d34") (revision "1")) (package [...]))) --8<---------------cut here---------------end--------------->8--- I feel like there are some issues with this idiom (in no particular order): 1. When converting between this idiom and regularly versioned packages, the git diff shows the whole package changing because of the indentation change. 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. 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. 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...) 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. 6. Not a direct complaint, but I feel like the overall package interface was designed before straight-from-vcs unversioned packages were so common, and so this idiom developed organically to work around that. I do not have a specific solution in mind, but I think there must be one. I do have a few half-baked ideas, but I'm curious what we can all come up with together. Or maybe you'll just tell me I'm just being awfully picky :) [0] https://issues.guix.gnu.org/50286 -- Sarah