[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package--builtin-versions
From: |
Artur Malabarba |
Subject: |
Re: package--builtin-versions |
Date: |
Sat, 23 May 2015 17:32:16 +0100 |
2015-05-22 2:41 GMT+01:00 Stefan Monnier <address@hidden>:
>> 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.