From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Summary and next steps for (package-initialize) Date: Fri, 25 Aug 2017 07:51:32 -0400 Message-ID: References: <83tw12cocz.fsf@gnu.org> <83wp5xat6i.fsf@gnu.org> <83pobk9aly.fsf@gnu.org> <837exs9603.fsf@gnu.org> <83shgg6t4q.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503661965 27294 195.159.176.226 (25 Aug 2017 11:52:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 11:52:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 25 13:52:40 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlDA9-0006Rm-Ap for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 13:52:33 +0200 Original-Received: from localhost ([::1]:52673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlDAG-00077q-5f for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 07:52:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlD9f-00077Z-Ba for emacs-devel@gnu.org; Fri, 25 Aug 2017 07:52:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlD9b-0003dq-CO for emacs-devel@gnu.org; Fri, 25 Aug 2017 07:52:03 -0400 Original-Received: from [195.159.176.226] (port=54881 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dlD9b-0003dN-5z for emacs-devel@gnu.org; Fri, 25 Aug 2017 07:51:59 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dlD9M-000488-7m for emacs-devel@gnu.org; Fri, 25 Aug 2017 13:51:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:ilvxiLn7nhWdC8zxlDLhqmkF/JM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:217810 Archived-At: > What about packages that include accommodations to, and dependencies > on, other packages? Imagine the following situation: > > . package B modifies its behavior if package A is loaded > . the user sets up package-load-list such that package B should be > loaded, but package A should not be > . package B is activated by package-initialize after package A was > activated, so B modifies its behavior > . package-initialize unloads A > . the result is that B behaves as if A is loaded, contrary to what > the user wanted, and will probably produce weird errors at some > point, or subtly incorrect behavior > > I don't think we can claim in this case that there's a bug in either > of these two packages, can we? Or is there a way for the packages to > be prepared for such situations? [ Note: in the above "package A" and "package B" really refer to the files A-autoload.el and B-autoload.el, which aren't really "packages". I'll try to be more precise below. ] I guess B-autoload.el could add a function to a "A-autoload-unload-hook". But things can get worse: B-autoload.el could not only behave differently depending on whether A-autoload.el was loaded, but it could also cause A.el to be loaded, in which case unloading A-autoload.el won't be sufficient, unless we arrange for the unloading of A-autoload.el to also unload A.el. Again, here we're back to the obvious observation that do+undo is a poor and complicated way to do nothing. Stefan