[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63757: 29.0.91 order of package paths changed: random old versions o
From: |
Stefan Monnier |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> 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>-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