emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preferred approach to inclusion of data in ELPA package


From: Dmitry Gutov
Subject: Re: Preferred approach to inclusion of data in ELPA package
Date: Mon, 21 Aug 2023 01:59:30 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]