all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: 67696@debbugs.gnu.org
Cc: monnier@iro.umontreal.ca
Subject: bug#67696: 30.0.50; Help deal with multiple versions in load-path
Date: Sat, 16 Dec 2023 11:07:23 -0800	[thread overview]
Message-ID: <CADwFkmk4YBB=13E4j_Qa4Xni4dEk8pkreUzWO5RZS4iuSTLjGQ@mail.gmail.com> (raw)
In-Reply-To: <jwvmsumvuaj.fsf@iro.umontreal.ca>

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> With packages being available both as bundled with Emacs and as ELPA
> packages, it has become a lot more common place to have two versions of
> a package in the `load-path` and to have to deal with situations
> where the "incorrect" version has been loaded before `load-path`
> was changed.
>
> These kinds of problems manifest in various ways and we try to
> circumvent them in `package.el` in some cases but that can't cover
> all cases.
>
> I suggest we introduce a new function to help packages susceptible to
> those problems.  The patch below introduces a new function which
> I tentatively called `require-with-check` and shows how it could be used
> in the case of `eglot.el` (which relies on several core packages also
> distributed via GNU ELPA and currently uses a hack which slows it down
> unnecessarily in the normal case).

Will this be useful only for :core packages?  If so, it would be nice to
not have to introduce more functions and extra complexity just to deal
with this situation.  It seems like a problem we should be able to fix
without it leaking into our API.

I didn't think deeply about this so here's a probably naive question:
could we make `require' reload the file, if a newer one is detected
earlier in the load-path?

Are there any other alternative approaches that you considered?





  reply	other threads:[~2023-12-16 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 16:42 bug#67696: 30.0.50; Help deal with multiple versions in load-path Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-16 19:07 ` Stefan Kangas [this message]
2023-12-16 19:50   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-17 17:21     ` Stefan Kangas
2023-12-17 23:06       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-29 14:22         ` Stefan Kangas
2023-12-29 16:22           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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='CADwFkmk4YBB=13E4j_Qa4Xni4dEk8pkreUzWO5RZS4iuSTLjGQ@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=67696@debbugs.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.