From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] master add49b6: * lisp/emacs-lisp/package.el: Reduce autoloading before compiling
Date: Tue, 8 Sep 2015 02:59:20 +0100 [thread overview]
Message-ID: <CAAdUY-JX+5H=BFs5-sJ0upu5eDoQheVV3Pe3UsUk-OmYoGKjug@mail.gmail.com> (raw)
In-Reply-To: <jwvtwr5ae56.fsf-monnier+emacsdiffs@gnu.org>
package-activate-1 was being called twice during installation. Once
before compilation and once after.
IIUC, there are only two things in package-activate-1 that affect
byte-compilation: setting the load-path and loading the autoloads
file. So I refactored those two functionalities into
`package--activate-autoloads-and-load-path'.
Now, instead of calling `package-activate-1' before compilation, we
call this new simpler function.
`package-activate-1' is still called after compilation, and it's
functionality has not changed (it still sets the load-path and loads
autoloads by calling this new function, in addition to the other stuff
that it does).
1) `package-activate-1' has a couple of line that shouldn't be called
twice, like (push name package-activated-list) and (push pkg-dir
Info-directory-list). It wasn't the end of the world, but it was wrong
(again, IIUC) and it could get worse if we extend this function in the
future.
2) It's just confusing to see a package being activated twice
throughout a single installation. I find it more informative to do
specifically what we want (i.e., load autloads and set load-path
before compilation).
3) The name package-activate-1 gives the impression that it's an
implementation function for package-activate, which made it confusing
that it was being called outside package-activate.
2015-09-08 2:33 GMT+01:00 Stefan Monnier <monnier@iro.umontreal.ca>:
>> (package--autoloads-file-name)
>> (package--activate-autoloads-and-load-path): New function.
>> (package-activate-1): Delegate autoloading and load-path
>> configuration to `package--activate-autoloads-and-load-path'.
>> (package--compile): Before compilation, call
>> `package--activate-autoloads-and-load-path' instead of
>> `package-activate-1'.
>
> Not sure I follow what this is doing, nor why. Can you explain?
>
>
> Stefan
next prev parent reply other threads:[~2015-09-08 1:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150907225246.18328.36154@vcs.savannah.gnu.org>
[not found] ` <E1ZZ5HK-0004mE-CU@vcs.savannah.gnu.org>
2015-09-08 1:33 ` [Emacs-diffs] master add49b6: * lisp/emacs-lisp/package.el: Reduce autoloading before compiling Stefan Monnier
2015-09-08 1:59 ` Artur Malabarba [this message]
2015-09-08 13:46 ` Stefan Monnier
2015-09-08 14:55 ` Artur Malabarba
2015-09-08 18:02 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAdUY-JX+5H=BFs5-sJ0upu5eDoQheVV3Pe3UsUk-OmYoGKjug@mail.gmail.com' \
--to=bruce.connor.am@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.