From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9_?= =?UTF-8?Q?=D0=91=D0=BE=D0=B9=D0=BA=D0=BE=D0=B2?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path Date: Tue, 30 May 2023 01:44:11 +1000 Message-ID: References: Reply-To: =?UTF-8?Q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9_?= =?UTF-8?Q?=D0=91=D0=BE=D0=B9=D0=BA=D0=BE=D0=B2?= Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ef5a1b05fcd6f5c7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39636"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63757@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 29 19:31:36 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 1q3giV-000A8l-GU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 May 2023 19:31:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3gi1-0007Od-Ck; Mon, 29 May 2023 13: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 1q3ghz-0007OG-0M for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 13:31: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 1q3ghy-0002jS-OU for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 13:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3ghy-0002aa-Kr for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 13:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9_?= =?UTF-8?Q?=D0=91=D0=BE=D0=B9=D0=BA=D0=BE=D0=B2?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2023 17:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63757 X-GNU-PR-Package: emacs Original-Received: via spool by 63757-submit@debbugs.gnu.org id=B63757.16853814619937 (code B ref 63757); Mon, 29 May 2023 17:31:02 +0000 Original-Received: (at 63757) by debbugs.gnu.org; 29 May 2023 17:31:01 +0000 Original-Received: from localhost ([127.0.0.1]:59090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3ghv-0002aB-Nt for submit@debbugs.gnu.org; Mon, 29 May 2023 13:31:01 -0400 Original-Received: from smtp38.i.mail.ru ([95.163.41.79]:43890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3f2t-00030l-0g for 63757@debbugs.gnu.org; Mon, 29 May 2023 11:44:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=list.ru; s=mail4; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=cX2M/bbp7EIVJXWVLUqNsAMVYFqyiGXrt5a83hVEAEE=; t=1685375071;x=1685465071; b=ZBvb6b9+m2EiX55reJ1JeDQGO1zIm4x/rvQdSg4X0HeydRqkw0pEdi9TPF2OMURc82zv8juSWGuwqQ9WtsGxIPc9dWJ0qq2XXcGRXWBssfe+RCqX6JWQM+eHEHiOjSP/kB85P5W93tyV6ixc3Z8mquHfJtEaam9F5pKwEHImimQ+l84TQveE40oq4jbmlTN2wLEl24U//8y0UpDjRP7rsbo+HyjMWWvEltJRyGmQzdppo5rAot4XtLxF+ldG5PZ0ChDQYmACueKz9Sicl23R09oeF8dTEoS2OljRHYi7jzl+t0wYiVj9lKfxO5TNwV3YizYtJgP/RLrnGuA1EG+bow==; Original-Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1q3f2l-009pah-N3 for 63757@debbugs.gnu.org; Mon, 29 May 2023 18:44:24 +0300 Original-Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3f60804faf4so21914635e9.3 for <63757@debbugs.gnu.org>; Mon, 29 May 2023 08:44:23 -0700 (PDT) X-Gm-Message-State: AC+VfDwi4DHsMi2MDnDw9usAnBQEjd9FhuAog7nZNFjt2azNCZZy79hq nmz7k0YzuCRuYtH2/jmsPPMI54IQbVCJx6jtxzc= X-Google-Smtp-Source: ACHHUZ4A65MUh7k4IZnIjkvwMNG6thbQdDj1iYX9DRSxObuqW1ErC8IQ/HcGW6YzEQpOlF6Mtqa14H69WAW1BNmQoO8= X-Received: by 2002:a1c:f206:0:b0:3f5:176:c398 with SMTP id s6-20020a1cf206000000b003f50176c398mr10572921wmc.31.1685375062856; Mon, 29 May 2023 08:44:22 -0700 (PDT) In-Reply-To: X-Gmail-Original-Message-ID: Authentication-Results: smtp38.i.mail.ru; auth=pass smtp.auth=artscan@list.ru smtp.mailfrom=artscan@list.ru X-Mailru-Src: smtp X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9FA9FE7958A526B779D7BAB7BD016A2C842947415451E34B400894C459B0CD1B942D3C7EAA0D505333D10F43070E70B9A40F5C3A119B10A0D261E30AE1A3D80FE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE785DAC9A352760686C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE77603ADE015AF816DEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBA38448B8BA59D9530D66D1617B4D0ECE220879F7C8C5043D14489FFFB0AA5F4BF176DF2183F8FC7C0C8FBEF6EAD8577B08941B15DA834481FA18204E546F3947CCE4AEF6198D26326F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637FBB89C51EA700D9A389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F7900637831D49D9795134C1D81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE77EC1C3E655EA45F4EC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8 D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C309A7649CC036878F35872C767BF85DA2F004C90652538430E4A636 X-C1DE0DAB: 0D63561A33F958A5D8DC298A79713469F4854F427B05F9E4D34A56B4B71583D0F87CCE6106E1FC07E67D4AC08A07B9B0CE135D2742255B35CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742DC8270968E61249B1004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D345DE7771146E56B0859EE8D2B8C5775C677FEBBEA6325CCD5B655D9D65A334D78782A42563587A7561D7E09C32AA3244C26D46D3F559E4EA3F85A592FCCDF6D476C248321276684223EB3F6AD6EA9203E X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojjwJ7vqadnRtNk88yqPnSmQ== X-Mailru-Sender: 4C235FE2E5D2D8901A1E84CD5636A391A8A83F69A22458ADF30DB6E46C24270F4E4FC7339A2C458DA3C36B4D8423ABA5C77752E0C033A69EC36ED9D1848BBC3A06988B367FA93C37B4A721A3011E896F X-Mras: Ok X-Mailman-Approved-At: Mon, 29 May 2023 13:30:58 -0400 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:262608 Archived-At: --000000000000ef5a1b05fcd6f5c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Can you show how `package-alist` changes for `-go-mode` for you? To reproduce the case we need emacs 29.0.91 and ~/.emacs.d/elpa/go-mode-20170726.555/... ~/.emacs.d/elpa/go-mode-20220114.2239/... Run `emacs -Q` and `M-x package-initialize`. After that `package-alist` contains (go-mode #s(package-desc :name go-mode :version (20170726 555) :summary "Major mode for the Go programming language" :reqs nil :kind nil :archive nil :dir "/home/eab/.emacs.d/elpa/go-mode-20170726.555" :extras ((:keywords "languages" "go") (:url . "https://github.com/dominikh/go-mode.e= l ") (:commit . "99b06da201afb91e8db0c525c0f3c3590fd92fa6")) :signed nil) #s(package-desc :name go-mode :version (20220114 2239) :summary "Major mode for the Go programming language" :reqs ((emacs (26 1))) :kind nil :archive nil :dir "/home/eab/.emacs.d/elpa/go-mode-20220114.2239" :extras ((:url . "https://github.com/dominikh/go-mode.e= l ") (:keywords "languages" "go") (:maintainer "The go-mode Authors") (:authors ("The go-mode Authors")) (:commit . "fa2693278637f56759480d2bf203bb8aad107230")) :signed nil)) and `load-path` contains "/home/eab/.emacs.d/elpa/go-mode-20170726.555" On Mon, May 29, 2023 at 11:25=E2=80=AFPM Stefan Monnier wrote: > >> In your commit 04c4c578, package directories became NOSORT due to > (fourth t > >> argument) > >> (directory-files dir) > >> replaced by > >> (directory-files dir t "^[^.]" t) > >> > >> It affects package-alist forming. > > Can you show how `package-alist` changes for `-go-mode` for you? > > >> For example, there are old and new > >> versions of a package in my elpa directory: > >> > >> go-mode-20170726.555 > >> go-mode-20220114.2239 > >> > >> After (package-initialize) > >> in emacs 28 (require 'go-mode) gives 2022 version, e.g. the latest > version > >> of a package in most cases, directory-files default sorting works. > >> In emacs 29.0.91 I get old 2017 > > That shouldn't be the case (unless you specifically asked for it via > something like `package-pinned-packages`). > > >> version because of NOSORT unpredictable version order in > >> package-alist and hence random paths in load-path > > In its, this shouldn't make a difference, because it just changes the > order in which we consult the `-pkg.el` descriptors to populate > `package-alist` whereas the *activation* of the `go-mode` package is the > one that should choose the one with the higher version number. > > > No, this is not a feature but I think it might have uncovered a bug. > > Relying on the ordering of file names (which IIRC is lexiographic not > > numeric) is not a robust way to decide what packages should be preferre= d > > when loading descriptors. Could you submit a bug report to > > bug-gnu-emacs@gnu.org so that this issue can be discussed with the othe= r > > maintainers? > > Barring bugs, `package-alist` can be filled in any order (so the `nosort` > option shouldn't make a difference): we apply the proper sorting > (i.e. newest version at the front) in `package-process-define-package`. > > > Stefan > > --=20 __________________________ =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=91=D0=BE=D0=B9=D0=BA=D0=BE=D0=B2 =D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8= =D0=B9 =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87 =D1=81=D0=BE=D1=82. 8-924-202-25-65 e-mail: artscan@list.ru --000000000000ef5a1b05fcd6f5c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Can you show how `package-alist` changes for `-go-mod= e` for you?

To reproduce the case we need emacs 29.0.91 and

= =C2=A0 =C2=A0 ~/.emacs.d/elpa/go-mode-20170726.555/...
=C2=A0 =C2=A0 ~/.= emacs.d/elpa/go-mode-20220114.2239/...

Run `emacs -Q` and `M-x packa= ge-initialize`.

After that `package-alist` contains

=C2=A0=C2= =A0 (go-mode #s(package-desc :name go-mode :version
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (20170726 555)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :summary "Major mode for= the Go programming language" :reqs nil :kind nil :archive nil :dir &q= uot;/home/eab/.emacs.d/elpa/go-mode-20170726.555" :extras
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ((:keywords "languages" "go")
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(:url . "https://github.com/dominikh/go-mode.el")
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(:commit . "99b06da201afb91e8db0c525c0f3c35= 90fd92fa6"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :signed nil)
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 #s(package-desc :name go-mode :version
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (20220114 2239)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :summary &qu= ot;Major mode for the Go programming language" :reqs
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ((emacs
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (26 1)))
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 :kind nil :archive nil :dir "/home/eab/.emacs.d/elpa/go-= mode-20220114.2239" :extras
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((:url . "= https://github.com/domin= ikh/go-mode.el")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(:keywords "= ;languages" "go")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(:maintai= ner "The go-mode Authors")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(:auth= ors
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("The go-mode Authors"))=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(:commit . "fa2693278637f56759480d2bf20= 3bb8aad107230"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :signed nil))

and `= load-path` contains

=C2=A0 =C2=A0 "/home/eab/.emacs.d/elpa/go-m= ode-20170726.555"

On Mon, May 29, 2023 at 11:25=E2=80=AFPM Stefan Monni= er <monnier@iro.umontreal.ca= > wrote:
= >> In your commit 04c4c578, package directories became NOSORT due to = (fourth t
>> argument)
>>=C2=A0 =C2=A0 =C2=A0(directory-files dir)
>> replaced by
>>=C2=A0 =C2=A0 =C2=A0(directory-files dir t "^[^.]" t)
>>
>> It affects package-alist forming.

Can you show how `package-alist` changes for `-go-mode` for you?

>> For example, there are old and new
>> versions of a package in my elpa directory:
>>
>> go-mode-20170726.555
>> go-mode-20220114.2239
>>
>> After (package-initialize)
>> in emacs 28 (require 'go-mode) gives 2022 version, e.g. the la= test version
>> of a package in most cases, directory-files default sorting works.=
>> In emacs 29.0.91 I get old 2017

That shouldn't be the case (unless you specifically asked for it via something like `package-pinned-packages`).

>> version because of NOSORT unpredictable version order in
>> package-alist and hence random paths in load-path

In its, this shouldn't make a difference, because it just changes the order in which we consult the `<PKG>-pkg.el` descriptors to populate<= br> `package-alist` whereas the *activation* of the `go-mode` package is the one that should choose the one with the higher version number.

> No, this is not a feature but I think it might have uncovered a bug. > Relying on the ordering of file names (which IIRC is lexiographic not<= br> > numeric) is not a robust way to decide what packages should be preferr= ed
> when loading descriptors.=C2=A0 Could you submit a bug report to
> bug-gnu-ema= cs@gnu.org so that this issue can be discussed with the other
> maintainers?

Barring bugs, `package-alist` can be filled in any order (so the `nosort` option shouldn't make a difference): we apply the proper sorting
(i.e. newest version at the front) in `package-process-define-package`.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan



--
__________________________

=D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC,
=D0=91=D0=BE=D0=B9=D0=BA=D0=BE=D0=B2 =D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8= =D0=B9 =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87
=D1=81=D0=BE=D1=82. 8-924-202-25-65
e-mail: artscan@list.r= u
--000000000000ef5a1b05fcd6f5c7--