From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Preferred approach to inclusion of data in ELPA package Date: Mon, 21 Aug 2023 01:59:30 +0300 Message-ID: <6cd316c6-0c14-d2bf-60d1-9ffae88e6de8@gutov.dev> References: <28956ffc-6cc0-1f39-a26b-1453b48d61b1@hugot.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40006"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Hugo Thunnissen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 21 01:00:13 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qXrP1-000A7R-Ou for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Aug 2023 01:00:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXrOT-0000gn-4R; Sun, 20 Aug 2023 18:59:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXrOS-0000gD-6V for emacs-devel@gnu.org; Sun, 20 Aug 2023 18:59:36 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXrOP-0000TI-Vf for emacs-devel@gnu.org; Sun, 20 Aug 2023 18:59:35 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 260CD5C00D9; Sun, 20 Aug 2023 18:59:33 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 20 Aug 2023 18:59:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1692572373; x=1692658773; bh=g/RsmSvzSabINZmcgMHTtSgePFriWR7xnbP WI9eGJoU=; b=ancemz82OhF7sefF/5/kFUhdfnxgRcdxiUCjSRr5/fsz+ypcwuM ipICx5lPBk6Cb5xHHlhIPX1Fy9hekq2zyOz9rcozhlwmqP/elsmWP/V4VC/ufgAh 9hoRn1syLiH0bQtkAXr+4HVFgvBd+w8Kqv3hw3VaOHdmJkm8o7Pifdyc6KIm30ui J0CxeLaZPw0pK09HI/Ml8phpM+aWTB8ltFh4pXXkLX/NUGguoiHQs1pKmpdqo8sB 9dPk7ACVwtUK2Ptk4M5oj6KIJDLEUvtTG9TN6E7GmWnck8mnxzKjYoEYmtBZ0OwS gi8n//Po+VHtgL56J04tQeE0Dr5EEe9+8iQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1692572373; x= 1692658773; bh=g/RsmSvzSabINZmcgMHTtSgePFriWR7xnbPWI9eGJoU=; b=a yexhDu9yJCz/RyAa//0VEdK0l/sAmvgo9dJ6nhN5gIUTR/S4cRfF0Ba7hQla7oMQ ObcQ1GnJW99DyJbc0BIDfHJU5kaOp/sNZT7HuwUPd5HZGtR9cBGo1JcHCA3+iap+ pEozoo0jxQH5FquANNqBm3Nt9Auica5K9elXPMcH74uvtDNc0AGqsnmmamjdhLUM C/3Fak0dNHEZKLi7qDnIGQ4aoPXVR7mDe31d9eDGwD5jVAsYPfgfuFxIdxrGMl1/ souHskQB106jo8mV3bQAvnj/HTizJbRSz7aBwonpUcloSLnvkjRgThJSylaLRIhJ d8LLjHF4dBbjeH5V99ATQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddukedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu thhovhdruggvvheqnecuggftrfgrthhtvghrnhepgeehtdehudejieetuedttdejkeehje etueekheffuddtjeeuvdefveeuveeiuddunecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Aug 2023 18:59:31 -0400 (EDT) Content-Language: en-US In-Reply-To: <28956ffc-6cc0-1f39-a26b-1453b48d61b1@hugot.nl> Received-SPF: pass client-ip=66.111.4.28; envelope-from=dmitry@gutov.dev; helo=out4-smtp.messagingengine.com X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-4.279, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309004 Archived-At: 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?