From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: No Wayman Newsgroups: gmane.emacs.bugs Subject: bug#69410: 30.0.50; [WISHLIST] Use-package: allow :ensure to accept package spec instead of separate :vc keyword Date: Mon, 01 Jul 2024 10:28:50 -0400 Message-ID: <87v81p5gpp.fsf@gmail.com> References: <87wmqryzv2.fsf@gmail.com> <87jzi6lnjp.fsf@posteo.net> <87wmm55j42.fsf@hyperspace> <87zfr15hqj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15569"; mail-complaints-to="usenet@ciao.gmane.io" To: 69410@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 16:31:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sOI40-0003ml-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 16:31:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOI3d-0007K3-47; Mon, 01 Jul 2024 10:31:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOI3a-0007Iy-AZ for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 10:31:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOI3Z-0003vw-T1 for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 10:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOI3a-0005vH-6i for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 10:31:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87wmqryzv2.fsf@gmail.com> Resent-From: No Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2024 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69410 X-GNU-PR-Package: emacs Original-Received: via spool by 69410-submit@debbugs.gnu.org id=B69410.171984421222688 (code B ref 69410); Mon, 01 Jul 2024 14:31:02 +0000 Original-Received: (at 69410) by debbugs.gnu.org; 1 Jul 2024 14:30:12 +0000 Original-Received: from localhost ([127.0.0.1]:33467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOI2l-0005tq-Go for submit@debbugs.gnu.org; Mon, 01 Jul 2024 10:30:12 -0400 Original-Received: from mail-qv1-f42.google.com ([209.85.219.42]:47547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOI2j-0005sR-8v for 69410@debbugs.gnu.org; Mon, 01 Jul 2024 10:30:10 -0400 Original-Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6b51ae173ceso15372826d6.3 for <69410@debbugs.gnu.org>; Mon, 01 Jul 2024 07:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719844143; x=1720448943; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=2xtzXN8qesyJt4xQUv3itTt9NmBParIfW87/PLF20nc=; b=GRleXECzaGsxHSQXHvlkf2VVWDWesSzpnR6NOSNXbMpbquOANI+x+/WDOa5+IyZ/HD KfZdHG2/DSnHhZeAKM0csjpMvXQg4aoATciGOS7jhOjb3l9bz9o92TV0SUAw22uV3tQr EXJF5kCLdo+TOf/JVfNx8m4lJPA0V2cUoiPxbp2ev1pViBmvXTzacEkZzW3eU2fSp5Wv mK5WlUnzJ4rA8ODgxGjMb8sPWkIU9j/qjcRlZAEh4lOferw8QFkgLp/kG4vZS1s7zFLW Q7nPI3o3vUMSVSdPmxMpR+/feas0HHCzz36SdKKeqARMJClcNykXec5J7HFpubFLTaME Aa2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719844143; x=1720448943; h=content-transfer-encoding:mime-version:message-id:date:references :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2xtzXN8qesyJt4xQUv3itTt9NmBParIfW87/PLF20nc=; b=H+u4DhUnhmSvER36OakXgh8jMXgwro5EjK9beFA6Bt0T8nh/ThimcLQks8+CERcf8A uh1oIceeSSiy6tgyAXzRDCnvgHfHtT3la4mZdP9C0F/z74yGsC/BNjA3xjwgcohLYL7I 3RNUkXg9E0o1DQSTASLzUhGsa3DlkpFeJINBhWS1i2toktx6Sg8qed3H3lY7fQ2grHf5 5PZuvZhN3dLniwB4UNs0eikqbPbhu2tcHzUDaULb7ldFQh/FfNUeplvKDGfz75JgPEdq 5J0Pcumx4e7InpA/XStTCYf2vNR7fnK0txVLXwsVOQOwhtiCdjKpqpxGjUWaA6X/KnIX HIvQ== X-Gm-Message-State: AOJu0Yz/pLkDXTcVPlE045SxrfoxKsgMsw1fDkPJqFj1oRFqiwJzBt/W C9zYPNgY7tefIO0Gkjo29Me7D14vhttPeYdIBBjip1n+i0g9PKenQ2mdhA== X-Google-Smtp-Source: AGHT+IFQKRuBWGiXYl/a0M2JSH7bhEmLxFNYCusE0W+ktlv1mdtsnUZ/dG38KBvs9pzublNiU36/vA== X-Received: by 2002:ad4:5e87:0:b0:6b5:905a:f528 with SMTP id 6a1803df08f44-6b5b71a5d3fmr66204986d6.41.1719844142780; Mon, 01 Jul 2024 07:29:02 -0700 (PDT) Original-Received: from laptop ([2601:84:847f:c697:2d4:9eff:feb6:970c]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b59e368b4dsm33527296d6.28.2024.07.01.07.29.02 for <69410@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 07:29:02 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288257 Archived-At: -------------------- Start of forwarded message=20 -------------------- From: No Wayman To: Tony Zorman Subject: Re: bug#69410: 30.0.50; [WISHLIST] Use-package: allow=20 :ensure to accept package spec instead of separate :vc keyword Date: Mon, 01 Jul 2024 10:06:44 -0400 Tony Zorman writes: > Thanks. To be honest, I'm not a big fan of trying to cram=20 > everything > into :ensure. I wouldn't describe it as "cramming everything into :ensure". :ensure could accept: - nil: do not attempt to install anything - t: attempt to install via the user's chosen default package=20 manager=20 - a symbol name: install package matching that symbol name with=20 default package manager - a recipe spec: install via a forge capable package manager using=20 that package recipe.=20 It's not that complicated. If anything, it would encourage package-manager authors to support=20 a basic subset of keywords for the package recipe spec, increasing=20 cross-compatibility for package recipes. > By the same thought, one might > argue that something like :load-path should be inlined into=20 > :ensure as > well, which is not a good idea in my opinion. No one is arguing that. =20 > In either case, I think that > > (use-package example > :ensure (:url "https://www.forge.com/maintainer/example")) > > is not that much more verbose (or harder to adjust) than > > (use-package example > :ensure t > :vc (:url "https://www.forge.com/maintainer/example")) This is not what package authors provide in practice. Taking your example, the package installation section of a=20 package's README would look something like this: > (use-package example > :ensure t > ;; uncomment one of the following for your package manager=20 > of choice... > :vc (:url "https://www.forge.com/maintainer/example") > :straight (:repo "https://www.forge.com/maintainer/example") > :elpaca (:url "https://www.forge.com/maintainer/example") > :some-other-package-manager (:url ...) > ;; and so on... > ) Using my proposal: > (use-package example > :ensure (:url "https://www.forge.com/maintainer/example")) If a package manager decides not to support the :url recipe=20 keyword, that's on them. =20 > This is especially true since use-package-always-ensure exists=20 > (and many > people use it) so one would just have to write It's not about the `:ensure t`, it's about every package manager=20 requiring their own, separate interface to use-package, when they=20 basically operate on the same data structure. > Any kind of backwards compatibility with a hypothetical=20 > :straight > keyword would not work in either case, because :straight already=20 > exists > in straight.el and it has a completely different package=20 > specification > attached to it. Not asking for this, either. I'd like to see the `:straight` keyword go away. Making that happen would be the burden of straight's maintainers=20 (of which I am one). =20 >> My own take is that setting aside timing issues and the fact=20 >> that the >> Emacs 30 branch has been cut, ... I brought it up well before then, but nobody was interested/aware=20 enough to reply. (Not the first time it's happened on these mailing lists, and a=20 primary reason I seldom chime in.)=20 >> - The :vc keyword allows just passing t to download the package=20 >> as >> specified in the ELPA archive. I don't see an elegant away=20 >> to allow >> this using :ensure. > > Yes backwards compatibility might be a bit of a pain=E2=80=94especially=20 > with a > view on use-package-always-ensure=E2=80=94save having self-defeating=20 > constructs > like :ensure (:vc =E2=80=A6). It's evident there's little enthusiasm for the idea now, too. That being the case, I'll relax the constraints on Elpaca's recipe=20 format I placed in hopes of offering an easier switch between=20 package managers for users. Thanks for the input. -------------------- End of forwarded message --------------------