From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: package--builtin-versions Date: Sat, 23 May 2015 17:32:16 +0100 Message-ID: References: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1432398754 31593 80.91.229.3 (23 May 2015 16:32:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 May 2015 16:32:34 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 23 18:32:28 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 1YwCLX-0003Sa-VD for ged-emacs-devel@m.gmane.org; Sat, 23 May 2015 18:32:24 +0200 Original-Received: from localhost ([::1]:38145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwCLX-0004xC-Ef for ged-emacs-devel@m.gmane.org; Sat, 23 May 2015 12:32:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwCLT-0004x4-Ij for emacs-devel@gnu.org; Sat, 23 May 2015 12:32:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwCLS-0002ZG-DY for emacs-devel@gnu.org; Sat, 23 May 2015 12:32:19 -0400 Original-Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:33958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwCLS-0002YW-5j for emacs-devel@gnu.org; Sat, 23 May 2015 12:32:18 -0400 Original-Received: by lbcmx3 with SMTP id mx3so30111881lbc.1 for ; Sat, 23 May 2015 09:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=/ECEoRif0faYWl34z3gafh1Yi5xAJt4CZO6Ui1kb1Fk=; b=LmR1PG1lWEvhP5cFxUJ9cohFoqSl4tkSPk3R6xIPy8cKFByQrDctRKID/hMumUUJ5C wA0rnR69J9cht/6ugZKgxXV5mJOtvue48zRIIjQt+bj2s6x3xVMRfnL/FoQ9E/0y0NKY bV0tmWzyC0hJzOPKt/uVupDvCNXByHLW852XFctV8QsoLvm1a5rqDgptqCIuWkK476QG O6wwgs077ZNFj8lVtCqUwc4VZRoXCg2Ul6WcZQBLYGvMJPRnogbxgesj5Txt/lY4eE81 RQMib8Hw/jpCNW56w8Yva1ignp3J3yh5qrbtzlSQIfPfjwUOW6Qb2wMfUk+eni79wtrl 4WmQ== X-Received: by 10.152.203.233 with SMTP id kt9mr11021057lac.21.1432398736692; Sat, 23 May 2015 09:32:16 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Sat, 23 May 2015 09:32:16 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 7zJem7E85QlaittqrP125P4_e5w X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::232 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:186770 Archived-At: 2015-05-22 2:41 GMT+01:00 Stefan Monnier : >> 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 Thanks for the explanation, Stefan. Sounds like moving it into package.el would cause more problems than it solves.