From: Philip Kaludercic <philipk@posteo.net>
To: "Евгений Бойков" <artscan@list.ru>
Cc: Eli Zaretskii <eliz@gnu.org>,
63757@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path
Date: Sun, 04 Jun 2023 14:24:12 +0000 [thread overview]
Message-ID: <87v8g3mhkj.fsf@posteo.net> (raw)
In-Reply-To: <CAKOwOe4fGBRfiPNkDMFQCXScavobp8+=V7AqGC9DYtiqsvtu+w@mail.gmail.com> ("Евгений Бойков"'s message of "Mon, 5 Jun 2023 00:03:48 +1000")
Евгений Бойков <artscan@list.ru> writes:
>> Done. Should we close the issue then, or wait for more feedback?
>
> fa8135f8916 * emacs-29 origin/emacs-29 Revert changes to the order in which
> package descs are loaded
> - (dolist (pkg-dir (directory-files dir t "\\`[^.]" t))
> + (dolist (pkg-dir (directory-files dir t "\\`[^.]"))
>
> it doesn't fix the initial problem: `load-path` and `package-alist` are
> still broken in my test.
What does "broken" mean in this case? I fear that your patch just
changes what is necessary to resolve the issue in your case, but the
underlying problem (the destructive modification of `package-list')
still persists?
> Test:
> To reproduce the case we need emacs 29.0.91 + fa8135f8916 fix 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` and
> `load-path` contain the 2017 version as the first item in the list (instead
> of 2022).
>
> It can be fixed like this:
>
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index ba0e3618f28..6eaf261f5f4 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -922,11 +922,13 @@ correspond to previously loaded files."
> (v2 (package-desc-version p2)))
> (or
> ;; Prefer VC packages.
> - (package-vc-p p1)
> - (package-vc-p p2)
> + (and
> + (package-vc-p p1)
> + (not (package-vc-p p2)))
> ;; Prefer builtin packages.
> - (package-disabled-p p1 v1)
> - (not (package-disabled-p p2 v2))))))))
> + (and
> + (package-built-in-p p1 v1)
> + (not (package-built-in-p p2 v2)))))))))
> ;; Check if PACKAGE is available in `package-alist'.
> (while
> (when pkg-descs
>
> But if we leave it until 29.2, I will not insist :)
>
>
> On Sun, Jun 4, 2023 at 11:21 PM Philip Kaludercic <philipk@posteo.net>
> wrote:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> From: Philip Kaludercic <philipk@posteo.net>
>> >> Cc: artscan@list.ru, monnier@iro.umontreal.ca, 63757@debbugs.gnu.org
>> >> Date: Sun, 04 Jun 2023 12:32:17 +0000
>> >>
>> >> Eli Zaretskii <eliz@gnu.org> writes:
>> >>
>> >> >> - (dolist (pkg-dir (directory-files dir t "\\`[^.]" t))
>> >> >> + (dolist (pkg-dir (directory-files dir t "\\`[^.]"))
>> >> >> (when (file-directory-p pkg-dir)
>> >> >> (package-load-descriptor pkg-dir))))))
>> >> >>
>> >> >> (I attached the *vc-diff* buffer, but before sending the message I
>> >> >> invoked vc-diff again which modified the buffer contents. Should
>> have
>> >> >> just copied the diff manually...)
>> >> >
>> >> > Thanks, now it at least makes sense.
>> >> >
>> >> > But why does it matter whether the package directory names are sorted
>> >> > or not? Is sorting package versions the same as sorting the names of
>> >> > their directories?
>> >>
>> >> No, because directories are sorted by their names and by that metric,
>> >> "foo-10" is less than "foo-9". But since package archives like MELPA
>> >> use ISO 8601-like release-dates as version numbers, the order "works".
>> >> If we disable sorting, the files returned in any order the operating
>> >> system might have arbitrary stored the directory entries in which might
>> >> even change depending on the file system. So at the very least we can
>> >> argue that while sorting does not solve the issue, it provides a quick
>> >> hack to prevent sudden breakage from Emacs 28 to Emacs 29, due to users
>> >> relying on this kind of behaviour. A proper solution, that takes
>> >> version numbers into account should be prepared on the master branch.
>> >
>> > OK, thanks. Please install on emacs-29, and let's hope this doesn't
>> > cause new problems.
>>
>> Done. Should we close the issue then, or wait for more feedback?
>>
next prev parent reply other threads:[~2023-06-04 14:24 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 16:30 bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-29 11:09 ` Eli Zaretskii
2023-05-29 14:24 ` Philip Kaludercic
2023-06-03 10:19 ` Philip Kaludercic
2023-06-03 10:38 ` Eli Zaretskii
2023-06-03 11:50 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 12:53 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 13:33 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 14:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 4:46 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 5:37 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 5:41 ` Eli Zaretskii
2023-06-04 7:47 ` Philip Kaludercic
2023-06-04 8:03 ` Eli Zaretskii
2023-06-04 9:19 ` Philip Kaludercic
2023-06-04 10:14 ` Eli Zaretskii
2023-06-04 11:39 ` Philip Kaludercic
2023-06-04 12:08 ` Eli Zaretskii
2023-06-04 12:12 ` Philip Kaludercic
2023-06-04 12:19 ` Eli Zaretskii
2023-06-04 12:32 ` Philip Kaludercic
2023-06-04 12:46 ` Eli Zaretskii
2023-06-04 13:21 ` Philip Kaludercic
2023-06-04 14:03 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:24 ` Philip Kaludercic [this message]
2023-06-04 14:30 ` Eli Zaretskii
2023-06-04 14:47 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:55 ` Eli Zaretskii
2023-06-04 16:36 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 15:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 15:20 ` Eli Zaretskii
2023-06-04 15:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 16:15 ` Philip Kaludercic
2023-06-04 16:30 ` Eli Zaretskii
2023-06-04 16:53 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 17:37 ` Philip Kaludercic
2023-06-04 18:32 ` Eli Zaretskii
2023-06-04 16:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 18:40 ` Philip Kaludercic
2023-06-04 19:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-05 7:55 ` Philip Kaludercic
2023-06-05 14:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-07 15:36 ` Eli Zaretskii
2023-06-07 18:38 ` Philip Kaludercic
2023-06-07 19:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08 9:26 ` Eli Zaretskii
2023-06-04 16:28 ` Eli Zaretskii
2023-06-04 15:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:54 ` Eli Zaretskii
2023-06-04 15:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 12:14 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 7:52 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 8:06 ` Eli Zaretskii
2023-06-04 8:43 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 8:54 ` Eli Zaretskii
2023-06-04 9:10 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 9:17 ` Philip Kaludercic
2023-06-04 10:16 ` Eli Zaretskii
2023-06-04 9:52 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-29 13:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-29 15:44 ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-30 2:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 8:37 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8g3mhkj.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=63757@debbugs.gnu.org \
--cc=artscan@list.ru \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.