From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: package--builtin-versions Date: Thu, 21 May 2015 21:41:13 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1432258901 13590 80.91.229.3 (22 May 2015 01:41:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 May 2015 01:41:41 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 22 03:41:32 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yvbxs-0006AL-GE for ged-emacs-devel@m.gmane.org; Fri, 22 May 2015 03:41:32 +0200 Original-Received: from localhost ([::1]:60013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvbxr-0002OE-PP for ged-emacs-devel@m.gmane.org; Thu, 21 May 2015 21:41:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvbxe-0002Ny-MV for emacs-devel@gnu.org; Thu, 21 May 2015 21:41:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvbxb-0002lm-Gv for emacs-devel@gnu.org; Thu, 21 May 2015 21:41:18 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:17366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvbxb-0002lY-Dp for emacs-devel@gnu.org; Thu, 21 May 2015 21:41:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AyFgA731xV/xaz+M5cgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYCAR+LOoRDQgeELQWZbgWZTIFFI4QUIoE2gUIBAQE X-IPAS-Result: A0AyFgA731xV/xaz+M5cgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBAQYCAR+LOoRDQgeELQWZbgWZTIFFI4QUIoE2gUIBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="121604651" Original-Received: from 206-248-179-22.dsl.teksavvy.com (HELO pastel.home) ([206.248.179.22]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 May 2015 21:41:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C514424D1; Thu, 21 May 2015 21:41:13 -0400 (EDT) In-Reply-To: (Artur Malabarba's message of "Thu, 21 May 2015 23:13:19 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186730 Archived-At: > I stumbled into this odd little variable the other day, and I was > wondering why it's designed the way it is. It was the easy way to get this data uptodate and reasonably cheap. > (defvar package--builtin-versions > (eval-when-compile > (go-thtough-builtin-packages-and-accumulate-autoloads))) Two problems with that: 1- you need to write go-thtough-builtin-packages-and-accumulate-autoloads, instead of piggy-backing on autoload.el (which benefits from the optimization of only looking at the files that were changed, for example). 2- if package.el doesn't change while some builtin package is upgraded/added, this var will be out-of-date. > This should still happen at bootstrap time, so it wouldn't affect > Emacs startup. In fact, it might help emacs startup a little bit, > since there would be 76 fewer forms in `loaddefs.el'. It would be nice to only define package--builtin-versions when we need it (i.e. when package.el is loaded), but it's not super important: package--builtin-versions is pretty small and loaddefs.el is preloaded so its size shouldn't affect Emacs startup. Stefan