From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bruce.connor.am@gmail.com Newsgroups: gmane.emacs.devel Subject: Elpa packages and macro dependencies. Date: Thu, 16 Oct 2014 17:06:15 +0100 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01182fd094381505058c6deb X-Trace: ger.gmane.org 1413475603 26961 80.91.229.3 (16 Oct 2014 16:06:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 16:06:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 16 18:06:36 2014 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 1XenZQ-0003Yj-Ug for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 18:06:33 +0200 Original-Received: from localhost ([::1]:51163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XenZQ-00048u-Fm for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 12:06:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XenZB-00048c-KH for emacs-devel@gnu.org; Thu, 16 Oct 2014 12:06:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XenZA-0006W4-Hs for emacs-devel@gnu.org; Thu, 16 Oct 2014 12:06:17 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:42546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XenZA-0006Vy-CD for emacs-devel@gnu.org; Thu, 16 Oct 2014 12:06:16 -0400 Original-Received: by mail-oi0-f44.google.com with SMTP id x69so2933221oia.31 for ; Thu, 16 Oct 2014 09:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=EsPMehcsgjYw/V34z2b5C6+ZUHuHoq4dhBTDQCu8jTw=; b=EP/MrkTArniSAbUnIJEdtr6rEiycQ4lQD8P8kvObXKuJbK3Z67zdtlmzOtiF4g3DK+ pDuUNzpbSszrRPQyiZNjs+ad+GSz1JB2uM2PPZsTJfTcmy3bzKsgXYm+AXs8mahN0v8w VL0OnZvu54hPcU5enN3C2oOVyA4JurFlvir55PQDnIXw4sZ2/AaUydmNI1AVsS+CPwSe 5VvGVWBb2Ac2QktBWpfEVUYCWucXDF2H4eBLVI0Q57NQU5GlI8hptAiag8zyFo/T8Mfh 7V/QvEcDq9Ik+EGhT7e3IeIh6pWQ8b82waEeVVJLLbCQq47NqHY7zwOpgDS5XwcsProJ CrNQ== X-Received: by 10.60.157.100 with SMTP id wl4mr1794529oeb.37.1413475575541; Thu, 16 Oct 2014 09:06:15 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Thu, 16 Oct 2014 09:06:15 -0700 (PDT) X-Google-Sender-Auth: A2L2CBKlSwMwgzbL7DcaZSfAOXo X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22c 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:175464 Archived-At: --089e01182fd094381505058c6deb Content-Type: text/plain; charset=UTF-8 I'm running into a problem, but I'm not sure it's actually a bug, so I'm bringing it here. Say a user has an Elpa package installed, called A (version 1.0) and would like to install package B. Package B has a (require 'A) statement, because it uses one of A's macros. However, B lists (A "1.1") in its PackageRequires, because it uses some new feature of this macro which was added in version 1.1. 1. Our innocent user then launches `list-packages', and selects to install B. 2. Package.el knows that B depends on A-1.1, so it upgrades A first. 3. However, _if I understand things correctly_, package.el doesn't reload A after upgrading it, which means that the old definitions are still active! 4. Once it proceeds to byte-compile the newly installed B, the (require 'A) statement won't load anything because the old A is already loaded. And the byte-compilation of B will use the old macro definition, despite B specifically listing A-1.1 as a dependency! 5. Restarting Emacs won't fix it because B was already compiled wrong. The user has to restart Emacs, AND reinstall (or recompile) B. Am I correct in my understanding? I believe this would be avoided by using (load "A") instead of (require 'A). Is this advisable? Would this problem go away if B used (eval-when-compile (require 'A))? Best and Thanks, Artur --089e01182fd094381505058c6deb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm running into a problem, but I'm not sure it's actual= ly a bug, so I'm bringing it here.

Say a user has an Elpa = package installed, called A (version 1.0) and would like to install package= B.
Package B has a (require 'A) statement, because it uses on= e of A's macros. However, B lists (A "1.1") in its PackageRe= quires, because it uses some new feature of this macro which was added in v= ersion 1.1.

1. Our innocent user then launches `l= ist-packages', and selects to install B.
2. Package.el k= nows that B depends on A-1.1, so it upgrades A first.
3. However, = _if I understand things correctly_, package.el doesn't reload A after u= pgrading it, which means that the old definitions are still active!
4. Once it proceeds to byte-compile the newly installed B, the (require &= #39;A) statement won't load anything because the old A is already loade= d. And the byte-compilation of B will use the old macro definition, despite= B specifically listing A-1.1 as a dependency!
5. Restarting= Emacs won't fix it because B was already compiled wrong. The user has = to restart Emacs, AND reinstall (or recompile) B.

A= m I correct in my understanding?
I believe this would be avoided = by using (load "A") instead of (require 'A). Is this advisabl= e?
Would this problem go away if B used (eval-when-compile (requir= e 'A))?

Best and Thanks,
Artur
--089e01182fd094381505058c6deb--