all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Elpa packages and macro dependencies.
@ 2014-10-16 16:06 bruce.connor.am
  2014-10-16 16:09 ` Glenn Morris
  0 siblings, 1 reply; 35+ messages in thread
From: bruce.connor.am @ 2014-10-16 16:06 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1635 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2014-12-10 19:14 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-16 16:06 Elpa packages and macro dependencies bruce.connor.am
2014-10-16 16:09 ` Glenn Morris
2014-10-16 16:56   ` bruce.connor.am
2014-10-16 16:59   ` Thierry Volpiatto
2014-10-16 17:44   ` Stefan Monnier
2014-10-16 17:57     ` bruce.connor.am
2014-10-16 19:57       ` Stefan Monnier
2014-10-17  8:28         ` bruce.connor.am
2014-10-17 15:54           ` bruce.connor.am
2014-10-17 16:36             ` Stefan Monnier
2014-10-17 21:24               ` bruce.connor.am
2014-10-18 21:41                 ` Stefan Monnier
2014-10-20  8:58                   ` Nicolas Richard
2014-10-20  9:33                     ` Artur Malabarba
2014-10-20 19:04                       ` Stefan Monnier
2014-10-20 20:25                         ` Artur Malabarba
2014-10-20 20:40                           ` Stefan Monnier
2014-11-13 11:57                       ` Artur Malabarba
2014-11-13 17:34                         ` Stefan Monnier
2014-12-10 18:38                           ` Artur Malabarba
2014-12-10 19:14                             ` Stefan Monnier
2014-10-19  6:57               ` Achim Gratz
2014-10-20 15:29                 ` Stefan Monnier
2014-10-20 16:34                   ` Achim Gratz
2014-10-20 18:00                     ` Stefan Monnier
2014-10-20 19:16                       ` Achim Gratz
2014-10-20 21:04                         ` Stefan Monnier
2014-10-21 17:41                           ` Achim Gratz
2014-10-16 21:05     ` Achim Gratz
2014-10-17  3:03       ` Stefan Monnier
2014-10-17  8:01         ` Achim Gratz
2014-10-17 12:03           ` Phillip Lord
2014-10-17 13:51             ` Tom Tromey
2014-10-17 12:39           ` Stefan Monnier
2014-10-17  8:39       ` bruce.connor.am

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.