jwiegley / emacs-async

Simple library for asynchronous processing in Emacs
GNU General Public License v3.0
828 stars 68 forks source link

Customizing async-bytecomp-allowed-packages #117

Closed gusbrs closed 4 years ago

gusbrs commented 4 years ago

As far as I understood, async-bytecomp-allowed-packages must be a list. The readme is clear in suggesting that, if we want all packages to be compiled asynchronously, it should be set to '(all).

However, the docstring of the corresponding defcustom not only doesn't mention this requirement, but it actually misleads in saying "this variable can also be the symbol 'all'". As a matter of fact, the defcustom corresponds to the docstring and, if we customize the variable through the customization interface, we get '(async-bytecomp-allowed-packages (quote all)). (And my Emacs fails to start if I do so).

So, if I understood correctly that this variable must be a list, both the value for "All packages" and the docstring should probably be revised.

Edit: Taking a look at the changelog and recent commits, I see this has been a recent change. I presume, in reading them, that the "symbol 'all'" should be accepted. In reading the code, I also do not understand why I have problems with it. But, if I start emacsclient it fails silently (daemon is running), and a regular emacs will give me the message "require: Wrong type argument: listp, all". emacs --debug-init was not any help (same result). I'll try to figure it out, but if you fell this is probably an issue with my configuration, feel free to close. If you think it might not be, I'm at your disposal to provide more information at your guidance.

gusbrs commented 4 years ago

A little bisecting, as usual, goes a long way. The issue arises with magit (if disabled, Emacs starts normally). I have it here installed from "Melpa-stable", in version 2.90.1. I could pin it to Melpa, but then other dependencies would also have to follow.

For myself, I will keep '(all) for the time being. Feel free to proceed as you please with this, including just closing it, if this is deemed just a transitory thing until all tagged versions match.

Edit: More precisely, the problem arises in with-editor (magit dependency), of which I have version 2.8.3, and has the following:

(and (require 'async-bytecomp nil t)
     (memq 'magit (bound-and-true-p async-bytecomp-allowed-packages))
     (fboundp 'async-bytecomp-package-mode)
     (async-bytecomp-package-mode 1))

where the second line is the offending one. This block is no longer found in the current dev version of with-editor. So, this is clearly a problem of package version mismatch, which should be temporary. That said, I'll close this one, and apologize for the noise.