all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Psionic K <psionik@positron.solutions>
To: "Björn Bidar" <bjorn.bidar@thaodan.de>
Cc: Psionic K <psionik@positron.solutions>, help-gnu-emacs@gnu.org
Subject: Re: Reacting to package load
Date: Tue, 28 Nov 2023 11:12:53 +0900	[thread overview]
Message-ID: <CADQMGARnm5dQQ_dqQ+zEsATFui_NWThzsAy-degCdeNsQh7_gQ@mail.gmail.com> (raw)
In-Reply-To: <87y1ejpmbz.fsf@thaodan.de>

> Not in all cases it's good to check for dependencies only after the
depending package was loaded.

Yes, and this will continue to be true for packages that resolve and
configure external dependencies at load time rather than dynamically after
giving us a chance to react.  I'm going with after-load-functions for now.

In the future, packages will cooperate with dependency management through a
new package header to communicate which non-elisp packages are required.

Long term, Emacs needs to mediate the implementation of providing external
deps in reaction to loaded Elisp deps.   A non-standard hook such as
before-load-functions will enable external dependency managers to pre-empt
missing software before any chance for problems downstream.

To be clear, these dependency managers will be agnostic to Elpaca,
Straight, package.el etc.  They don't care what they are doing, just which
package got loaded so they can see if the dependency is already available.

If there's a more obvious extra header name than X-Package-External to
describe a non-elisp dependency, please say so.   I am using an X prefix
because I have seen this used for other additional headers that don't have
a standard meaning yet.

The contents of the header needs to accommodate both generic and specific
styles so that more specific declarations can override generic ones

For an example:

X-Package-External: (((nix . "cowsay") (guix . "cowsay") "cowsay"))

Each entry is a list for one dependency.  The dependency is specified via
generic paths in a string and then in specific paths with a cons if
necessary.

I'll take a closer look at Guix.  I didn't identify anything concerning,
but I've lost familiarity.  IIRC both Nix and Guix support more explicit
string paths where necessary.

The external dependency managers and use-package will of course override
packages to alleviate pressure on upstreams, via new keywords and supplying
values for missing headers.  In the beginning, this will be the only
available mechanism.

On Mon, Nov 27, 2023 at 6:38 PM Björn Bidar <bjorn.bidar@thaodan.de> wrote:

>
> As Eli already said there's eval after load but there's also
> featurep to check if a feature is present.
> Not in all cases it's good to check for dependencies only after the
> depending package was loaded.
>


-- 

남백호
대표 겸 공동 창업자
포지트론


  reply	other threads:[~2023-11-28  2:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25 12:54 Reacting to package load Psionic K
2023-11-25 13:06 ` Eli Zaretskii
2023-11-27  9:38 ` Björn Bidar
2023-11-28  2:12   ` Psionic K [this message]
2023-11-28  2:32     ` Psionic K

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=CADQMGARnm5dQQ_dqQ+zEsATFui_NWThzsAy-degCdeNsQh7_gQ@mail.gmail.com \
    --to=psionik@positron.solutions \
    --cc=bjorn.bidar@thaodan.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.