all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Hugo Thunnissen <devel@hugot.nl>, emacs-devel@gnu.org
Subject: Re: Preferred approach to inclusion of data in ELPA package
Date: Mon, 21 Aug 2023 01:59:30 +0300	[thread overview]
Message-ID: <6cd316c6-0c14-d2bf-60d1-9ffae88e6de8@gutov.dev> (raw)
In-Reply-To: <28956ffc-6cc0-1f39-a26b-1453b48d61b1@hugot.nl>

On 17/08/2023 16:58, Hugo Thunnissen wrote:
> 1. Distribute the stubs with the package and parse them each time **when 
> the package is loaded**.
> 
> 2. Parse and index the stubs, then serialize the resulting index into a 
> gzipped lisp data file that is checked into version control, and is 
> loaded **when the package is loaded**. (BTW, should such a .eld file be 
> byte compiled for any reason?)
> 
> 3. Parse and index the stubs, then serialize the resulting index 
> **during compile time**. Either by generating lisp code using a macro, 
> or by serializing the index into a .eld file. This guarantees the index 
> staying up to date with the contents of the stub files whenever the 
> package is compiled.

How about parsing them lazily? When the package is loaded and the 
processed info isn't there, you parse the stubs and save the result to a 
file. Next time you see it exists and read/load it.

This can come with some "staleness" mechanics (do the stubs require 
frequent updates?), as well as the user's ability to delete them anyway 
and force to be generated anew.

Offhand, I don't see any downsides for this behavior: the installation 
we be faster by avoiding this step, the delay when the generation 
happens will be localized to the user's loading the mode (so they will 
be able to guess the reason easily), and it's not like generation during 
byte-compilation would proceed any faster?



      parent reply	other threads:[~2023-08-20 22:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 13:58 Preferred approach to inclusion of data in ELPA package Hugo Thunnissen
2023-08-17 21:14 ` Philip Kaludercic
2023-08-19 11:26   ` Hugo Thunnissen
2023-08-19 15:51     ` Philip Kaludercic
2023-08-20 19:24       ` Hugo Thunnissen
2023-08-20 20:42         ` Philip Kaludercic
2023-08-29  8:41           ` Hugo Thunnissen
2023-08-30 19:27             ` Philip Kaludercic
2023-08-20 13:30 ` sbaugh
2023-08-20 17:47   ` Hugo Thunnissen
2023-08-20 19:43     ` Hugo Thunnissen
2023-08-20 22:59 ` Dmitry Gutov [this message]

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=6cd316c6-0c14-d2bf-60d1-9ffae88e6de8@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=devel@hugot.nl \
    --cc=emacs-devel@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.