unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Artur Malabarba <bruce.connor.am@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] master add49b6: * lisp/emacs-lisp/package.el: Reduce autoloading before compiling
Date: Tue, 08 Sep 2015 09:46:30 -0400	[thread overview]
Message-ID: <jwv8u8h81y1.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <CAAdUY-JX+5H=BFs5-sJ0upu5eDoQheVV3Pe3UsUk-OmYoGKjug@mail.gmail.com> (Artur Malabarba's message of "Tue, 8 Sep 2015 02:59:20 +0100")

> IIUC, there are only two things in package-activate-1 that affect
> byte-compilation: setting the load-path and loading the autoloads
> file.

Hmm... I think that "Call `load' on all files in `pkg-dir' already present in
`load-history'" would also affect compilation, so it should be in
package--activate-autoloads-and-load-path.

> 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).

They should be fixed to be idempotent since that can happen in any case
if the package was activated and then gets updated (and hence re-activated).

> 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).

That makes sense.  I think compilation is a separate step which should
be optional (and as mentioned elsewhere, we should have a command to
perform (re)compilation of a package separately afterwards).

So the presence of two "activation" calls is legitimate (the one for
compilation is needed if the package was not activated yet, and the
other is needed if compilation did not happen).  But I wonder why they
should be different.  Can't we just have the "non-compilation
activation" be performed before compilation takes place, and then change
compilation so that it only activates the package if that was not
done yet?


        Stefan



  reply	other threads:[~2015-09-08 13:46 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
2015-09-08 13:46       ` Stefan Monnier [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8u8h81y1.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).