From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic 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 19:57:42 +0000 Message-ID: <878qyk7umh.fsf@posteo.net> References: <87wmqryzv2.fsf@gmail.com> <87jzi6lnjp.fsf@posteo.net> <87wmm55j42.fsf@hyperspace> 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="26630"; mail-complaints-to="usenet@ciao.gmane.io" Cc: No Wayman , 69410@debbugs.gnu.org To: Tony Zorman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 21:58:34 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 1sONAX-0006ek-QP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 21:58:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sONAE-0005zo-9A; Mon, 01 Jul 2024 15:58:14 -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 1sONA8-0005xt-Bg for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 15:58:11 -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 1sONA1-0005fP-3d for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 15:58:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sONA1-00012z-OO for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 15:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2024 19:58: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.17198638744010 (code B ref 69410); Mon, 01 Jul 2024 19:58:01 +0000 Original-Received: (at 69410) by debbugs.gnu.org; 1 Jul 2024 19:57:54 +0000 Original-Received: from localhost ([127.0.0.1]:34740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sON9u-00012c-AT for submit@debbugs.gnu.org; Mon, 01 Jul 2024 15:57:54 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:53105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sON9r-00012N-RE for 69410@debbugs.gnu.org; Mon, 01 Jul 2024 15:57:53 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 995B8240027 for <69410@debbugs.gnu.org>; Mon, 1 Jul 2024 21:57:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719863864; bh=/Xpwk4A7zgd8fz9aJYF/cK+50vFBbacqOd9SMReyQSw=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=D0sFCqHmzW5tcRvFB7GqXiSJ+kKiNeCbbfcV+Gpz8sQxZhq9njTaKEprB8252e4N0 /JErMkx9oGfkvXXazUgTExAKa0iOTNtsgeUeYRbeXbubGZLB4CXWUO1/DVYaWFJw6e HvR7cQawMdDLDoI6Mg1bISFApGAL92Io421++Rw+bMeDCBVHBNrDd3wSwnfRjmCLM8 DOyXxnxXX9iz3B+ojNGjasa9SP1soyPQt6+50sEkDSBTYp/7OHa3nosaC7om6NEott Ngq8J2/52jgGFimFWrizYc11g0tAWemBFY+ViOq6w1uroiRoSkw31SnCTPifhgZmS+ R5EE1comfPsog== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WCcK34MCvz9rxB; Mon, 1 Jul 2024 21:57:42 +0200 (CEST) In-Reply-To: <87wmm55j42.fsf@hyperspace> (Tony Zorman's message of "Mon, 01 Jul 2024 15:37:01 +0200") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt 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:288266 Archived-At: Tony Zorman writes: > 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")) BTW Does it ever make sense to give a :vc keyword without :ensure t or enabling `use-package-always-ensure'? > 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. 1+ >> 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 w= ith a > view on use-package-always-ensure=E2=80=94save having self-defeating cons= tructs > like :ensure (:vc =E2=80=A6). I am not sure what you mean here? > Tony --=20 Philip Kaludercic on peregrine