From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#62720: 29.0.60; Not easy at all to upgrade :core packages like Eglot Date: Sun, 23 Apr 2023 23:56:23 +0300 Message-ID: <952d1e4d-ef80-ae15-ae27-508ec3d68559@gutov.dev> References: <87a5zj2vfo.fsf@gmail.com> <87r0sptinq.fsf@posteo.net> <83jzyh706c.fsf@gnu.org> <875ya1tdwf.fsf@posteo.net> <83edop6sdy.fsf@gnu.org> <831qkp6o0i.fsf@gnu.org> <83wn2h5825.fsf@gnu.org> <87wn2gkhzr.fsf@posteo.net> <83cz485oxi.fsf@gnu.org> <87leiwdyff.fsf@posteo.net> <834jpk5hih.fsf@gnu.org> <871qkom3fj.fsf@posteo.net> <83mt3b4yfc.fsf@gnu.org> <87edonlsxi.fsf@posteo.net> <83jzyf4vzb.fsf@gnu.org> <871qknllkj.fsf@posteo.net> <83fs934pjf.fsf@gnu.org> <87wn2fk47y.fsf@posteo.net> <87354q92gh.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3408"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: 62720@debbugs.gnu.org, Eli Zaretskii , larsi@gnus.org, monnier@iro.umontreal.ca, joaotavora@gmail.com To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 23 22:57:22 2023 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 1pqgls-0000ec-NI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Apr 2023 22:57:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqglc-0003jN-53; Sun, 23 Apr 2023 16:57: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 1pqglb-0003jE-2D for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2023 16:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqgla-0005wk-Eo for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2023 16:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pqglZ-0001Mz-RU for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2023 16:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Apr 2023 20:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62720 X-GNU-PR-Package: emacs Original-Received: via spool by 62720-submit@debbugs.gnu.org id=B62720.16822833955224 (code B ref 62720); Sun, 23 Apr 2023 20:57:01 +0000 Original-Received: (at 62720) by debbugs.gnu.org; 23 Apr 2023 20:56:35 +0000 Original-Received: from localhost ([127.0.0.1]:47027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqgl8-0001MB-Fy for submit@debbugs.gnu.org; Sun, 23 Apr 2023 16:56:34 -0400 Original-Received: from new1-smtp.messagingengine.com ([66.111.4.221]:52973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqgl7-0001Lz-3G for 62720@debbugs.gnu.org; Sun, 23 Apr 2023 16:56:33 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 04FA6582160; Sun, 23 Apr 2023 16:56:28 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 23 Apr 2023 16:56:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1682283387; x=1682286987; bh=kV4QoMs0FR4T7w+WZ5UwjKcY1yglRILcyAz /vEkiprw=; b=Ror49Duwn+qHQ9cbi3th7fzqyehdqRAtwh4MJmythSr/6qhZTpr MXLDXFg1TqXJJM5OvLzNcCyhgQBNoAvIhsSRx+kIGCWfHX6nS04u7F/m5/G+2TYb /f7qIuMmvKh/D7R+2WgGOrVUOFfw9NxqL/2GVLB2m0uycr8IKRJQQT3QBOhqYVO5 rgsl4gD5c4AoEeW97yUnj0zrQVYWC64Z7F3p9YeKoSTkio1CQdrOLMx+AoQSxHrh MeIfs8KAO6/eETnRHIvB6WvMP0JTHKagkcwRlsR6zacT6jWxno8Q5/1YCSBzH9yT yJDiqCuI81E+9ouLXYBgIKhrId/V5dMdkQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1682283387; x=1682286987; bh=kV4QoMs0FR4T7w+WZ5UwjKcY1yglRILcyAz /vEkiprw=; b=hR+V3yD2DGviRjrF93Tk8cV6lEwydwFa7RUpy22Z1Nt1e72HT/6 bcp1XlXneFf6nDyCcvlZ3Cu2EgbK3zVxCW6mhVIzEzw2A+xlAmggjAhGYbk96D/T fi3q/DHbAI58B6FctCrMVQ6iXqDEshy4/3bySbRrVaJVuckj3G/fRIP6Y5ZYWlO4 KmuwoBDj2anpMjwV92GN0Pfrg9BshEHufaWLtXHYsQy8hyolEfDiCzrbGlcbuRWg PnqqfHVopDhC38rmdBF3ZjBv0UAV30kxug90eBQryf/Do59RT+h1wkJ8iy8yGUpn IB6twnpfsZUdjMtEciu7CcCWW3o67CDtZ6g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtkedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 23 Apr 2023 16:56:25 -0400 (EDT) Content-Language: en-US In-Reply-To: <87354q92gh.fsf@posteo.net> 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:260539 Archived-At: On 23/04/2023 16:02, Philip Kaludercic wrote: > Dmitry Gutov writes: > >> Philip, >> >> On 13/04/2023 21:49, Philip Kaludercic wrote: >>> + (when (and (or current-prefix-arg package-install-upgrade-built-in) >>> + (package--active-built-in-p pkg)) >>> + (setq pkg (cadr (assq name package-archive-contents)))) >> >> How sure are you that the first element in (cdr (assq name >> package-archive-contents)) will contain the latest version? > > This is not certain, but the same approach is used in other places in > package.el, so I just stocked to it. Perhaps they conceal latent bugs as well. I don't know the codebase too well, but the places I did examine used the comparison together with the priority. >> That's why I came with the more complex way to choose the appropriate >> package-desc in my latest attempt: >> >> (car >> (last (seq-sort-by #'package-desc-priority-version >> #'version-list-< >> (cdr (assq package package-archive-contents))))) > > If we insist on package.el installing the newest version, then this > would make sense. What's the alternative? Upgrading to "some version"? > AFAIK there is no guarantees on the order of packages > in `package-archive-contents'. This shouldn't be an issue for Eglot, > but might be one for use-package. Ah, it seems they removed it from Melpa, that shouldn't surprise me. Eglot is in the GNU-devel archive as well, though. So there is some potential for conflict. > I would actually pull it out into a > separate utility function that we would re-use in other places. Since I had to drop the respective code from the latest version of the patch, I guess you could put it in package-install instead. A reusable helper is fine, of course, but what are the other places we would use it at?