From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier 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: Mon, 29 May 2023 09:25:34 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24531"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63757@debbugs.gnu.org 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?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 29 16:11:35 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 1q3daw-0006BM-Tz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 May 2023 16:11:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3cst-0004ce-8L; Mon, 29 May 2023 09:26:03 -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 1q3css-0004cH-1q for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 09:26:02 -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 1q3csr-0000D8-PO for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 09:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3csr-0007Bl-LG for bug-gnu-emacs@gnu.org; Mon, 29 May 2023 09:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2023 13:26:01 +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.168536674527608 (code B ref 63757); Mon, 29 May 2023 13:26:01 +0000 Original-Received: (at 63757) by debbugs.gnu.org; 29 May 2023 13:25:45 +0000 Original-Received: from localhost ([127.0.0.1]:57362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3csb-0007BD-8P for submit@debbugs.gnu.org; Mon, 29 May 2023 09:25:45 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3csY-0007Ax-IO for 63757@debbugs.gnu.org; Mon, 29 May 2023 09:25:43 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6FABF100192; Mon, 29 May 2023 09:25:36 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 62147100098; Mon, 29 May 2023 09:25:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1685366735; bh=wfD+0BhBp9NZPbN1fYeJoLglRw97vxX/9UcmYbnFZoY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oq6He72DvyNnFZZvmHKHBHWIsrbGojYGYtwm23IK3pmdJCFScU3JtYQQf/qi+O2YS w+PZ6EWqrO9rfho4DcF9WI93lwuPHdSiS0pU0ypIf1kTl4UZ6alAFfFFEDUI6dPmLp NIodbYmRmHNedp8VL3QDsysKxUgftL5lytZL9a0VZEn3yd3LQ0o26d616nHNuFVBW1 ztrVvu2Htljb32IrZ5ZXwLQw1aBbQ8IqUTymk5J/3l0BU4GeVRnRBuPnqh7ORQlalO tq+W/qTP5VLEsspvm76m+978Pg4l+scZgwpPkM9A5w1OnEvNpCdTc8YcvPSmKqhtOP SXyh5uV7fUjPQ== Original-Received: from pastel (unknown [167.88.20.246]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3343E12045A; Mon, 29 May 2023 09:25:35 -0400 (EDT) In-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?="'s message of "Sun, 28 May 2023 02:30:18 +1000") 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:262580 Archived-At: >> 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 preferred > when loading descriptors. Could you submit a bug report to > bug-gnu-emacs@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`. Stefan