From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Summary and next steps for (package-initialize) Date: Fri, 25 Aug 2017 09:47:33 +0300 Message-ID: <83shgg6t4q.fsf@gnu.org> References: <83tw12cocz.fsf@gnu.org> <83wp5xat6i.fsf@gnu.org> <83pobk9aly.fsf@gnu.org> <837exs9603.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1503643736 1400 195.159.176.226 (25 Aug 2017 06:48:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 06:48:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 25 08:48:47 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 1dl8QA-00083C-BV for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 08:48:46 +0200 Original-Received: from localhost ([::1]:51832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl8QC-0004D8-6U for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2017 02:48:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl8PF-0004Bt-FS for emacs-devel@gnu.org; Fri, 25 Aug 2017 02:47:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dl8PB-0005sy-E7 for emacs-devel@gnu.org; Fri, 25 Aug 2017 02:47:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl8PB-0005su-Aw; Fri, 25 Aug 2017 02:47:45 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2046 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dl8PA-0005rE-MU; Fri, 25 Aug 2017 02:47:45 -0400 In-reply-to: (message from Stefan Monnier on Thu, 24 Aug 2017 23:52:19 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:217807 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Thu, 24 Aug 2017 23:52:19 -0400 > > >> - Change package-initialize so it keeps track of what it activated and if > >> called a second time, perform a diff between what was activated before > >> and what should be activated now and based on this activate the new pkgs > >> and deactivate the excess ones? > > This could prove tricky, if some package that shouldn't be loaded > > affects another package that should. Right? > > Not sure what "This" refers to. I'll assume you're referring to > "deactivate" Good assumption. > I was thinking of doing it via unload-feature and declare that if it > doesn't work quite-right, it's a bug in the package. 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?