From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tony Zorman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 15:37:01 +0200 Message-ID: <87wmm55j42.fsf@hyperspace> References: <87wmqryzv2.fsf@gmail.com> <87jzi6lnjp.fsf@posteo.net> Reply-To: Tony Zorman Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17645"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69410@debbugs.gnu.org To: Philip Kaludercic , No Wayman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 15:38:41 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 1sOHEs-0004Je-O4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 15:38:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOHEK-0004Dc-Fa; Mon, 01 Jul 2024 09:38:04 -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 1sOHEI-0004Cx-33 for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 09:38: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 1sOHEH-00046w-Oj for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 09:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOHEI-0004DY-0c for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 09:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2024 13:38:01 +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.171984103815974 (code B ref 69410); Mon, 01 Jul 2024 13:38:01 +0000 Original-Received: (at 69410) by debbugs.gnu.org; 1 Jul 2024 13:37:18 +0000 Original-Received: from localhost ([127.0.0.1]:60574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOHDZ-00049Z-Mu for submit@debbugs.gnu.org; Mon, 01 Jul 2024 09:37:18 -0400 Original-Received: from mout-p-201.mailbox.org ([80.241.56.171]:35448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOHDW-00047s-3e for 69410@debbugs.gnu.org; Mon, 01 Jul 2024 09:37:16 -0400 Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4WCRsp6vL7z9sZL; Mon, 1 Jul 2024 15:37:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1719841022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p1fWFD210Szz1yzp7x6+gVbxEBlW/TT5F2rskExEhac=; b=WaXfhK8/zAMxNkMowL7WLoXfdFgtBDNXlFOlFROknrsdIq2DwEpxzy/Jj9xYZicoo9CM1V 1oCxvtTUzAD3Mihc4ZVRAi9EFnbnScQ7JScSxtc4v73QRpAB3FziG56eyfGQRPYCozJ80s xYS3HSWjkFlMOhn1F0txvhUIky9I9rKqKFex90BIiDLPfz/rasOU+G/1w5Nqw32doQZTBM RfhZtsuZAAilCsK3S0CzlxQsKtvRfHeNpUbk5okTcAGlS5IEXskyc1MuUNq0Le64Cp11pR 8h9QyvjKV2WA1ZgwOjoCbIWka7gHjow+lEmxqgkA8rcp8KJbHso02AJ68RL9Fw== In-Reply-To: <87jzi6lnjp.fsf@posteo.net> X-MBO-RS-ID: 87aad044ff180f4b7d9 X-MBO-RS-META: 7ee4ki4dbciis51dfxkpzabh89iziw3e 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:288254 Archived-At: On Sun, Jun 30 2024 10:42, Philip Kaludercic wrote: > No Wayman writes: > >> I think it would be cleaner to allow use-package's :ensure keyword to >> accept the arguments the :vc keyword currently does. e.g. >> >> ;; Install EXAMPLE package from ELPA archive >> (use-package example :ensure t) >> >> ;; Install EXAMPLE package from source >> (use-package example :ensure (:url >> "https://www.forge.com/maintainer/example")) >> >> My reasoning is that this has greater potential to work across >> multiple package managers. >> Instead of each package manager adding their own use-package keyword >> (e.g. :vc, :straight, :elpaca), they can all interpret the :ensure >> keyword's value. It would make things simpler for package maintainers >> offering example declarations and users switching between package >> managers. > > I am adding Tony to the CCs, as he implemented the :vc keyword to see if > he has anything to comment (generally it is good to add a X-Debbugs-CC > header, mentioning specific maintainers or people involved in a feature > when submitting a bug). Thanks. To be honest, I'm not a big fan of trying to cram everything into :ensure. Implementation wise, I feel like it would make things much messier than they are now=E2=80=94especially if the final goal is to maybe extend this to other package managers. By the same thought, one might argue that something like :load-path should be inlined into :ensure as well, which is not a good idea in my opinion. 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 especially true since use-package-always-ensure exists (and many people use it) so one would just have to write (use-package example :vc (:url "https://www.forge.com/maintainer/example")) Any kind of backwards compatibility with a hypothetical :straight keyword would not work in either case, because :straight already exists in straight.el and it has a completely different package specification attached to it. > My own take is that setting aside timing issues and the fact that the > Emacs 30 branch has been cut, ... > > - The :vc keyword allows just passing t to download the package as > specified in the ELPA archive. I don't see an elegant away to allow > this using :ensure. Yes backwards compatibility might be a bit of a pain=E2=80=94especially wit= h a view on use-package-always-ensure=E2=80=94save having self-defeating constr= ucts like :ensure (:vc =E2=80=A6). Tony --=20 Tony Zorman | https://tony-zorman.com