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: [Emacs-diffs] master add49b6: * lisp/emacs-lisp/package.el: Reduce autoloading before compiling Date: Tue, 8 Sep 2015 15:55:41 +0100 Message-ID: References: <20150907225246.18328.36154@vcs.savannah.gnu.org> 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 1441724164 20815 80.91.229.3 (8 Sep 2015 14:56:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 14:56:04 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 16:56:03 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 1ZZKJU-0008Ek-8j for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 16:56:00 +0200 Original-Received: from localhost ([::1]:35027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZKJT-0007mU-HP for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 10:55:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZKJI-0007lB-Rb for emacs-devel@gnu.org; Tue, 08 Sep 2015 10:55:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZKJC-0006qm-Sq for emacs-devel@gnu.org; Tue, 08 Sep 2015 10:55:48 -0400 Original-Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:35136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZKJC-0006qI-Ke for emacs-devel@gnu.org; Tue, 08 Sep 2015 10:55:42 -0400 Original-Received: by lbpo4 with SMTP id o4so55059746lbp.2 for ; Tue, 08 Sep 2015 07:55:41 -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=6r8MCBQhhxXXlwELIsx6KgP7MQFmIzJ+erXD3QbNLW0=; b=ML/AgNrLjg7jVK4mpi69v6bdy2ZCWSOhp+SuNMzEeEq2rKjmFcrGAgAr1vb521Bpid Fku2B15RuiN7nXOp5ffiwa3k55JlZ+ceGUT8PSClxL5DWKugWngG75q0TJihZqpodILQ RCDp67pQ2rXjOThbZRNG7Ui679IGa/DOEFEuc34CDixXkbdHN8b8B6d+ZtyfZvHpoOgn N5juon9k7nkFo5dAlLPn3Uj+QmBpi5aIelrVDpVAFRaddcN5zq0mYajzQhV2I7jr3Wog gdj4xxRo3dtPRUWnPa5Un9i+HO2UNBHqYODJfjltqfPIycuEZNl66E0N035kSljY9Cvb qFHQ== X-Received: by 10.152.23.234 with SMTP id p10mr13233703laf.21.1441724141794; Tue, 08 Sep 2015 07:55:41 -0700 (PDT) Original-Received: by 10.25.213.202 with HTTP; Tue, 8 Sep 2015 07:55:41 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: e8VcMRxZ7rHsyvbRSoBV8CVR368 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 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:189714 Archived-At: 2015-09-08 14:46 GMT+01:00 Stefan Monnier : >> 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. It can, but this wasn't done in the first activation anyway (because the optional reload arg was nil) and I was trying to refactor without changing any behavior. But I guess it would fix some issues if the reloading happened before compilation as well. >> 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). OK >> 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? Yes, but we'll also have to add a third pseudo-activation step after byte-compilation where we reload files already loaded. After all, these files have now been compiled.