jwiegley / emacs-async

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

devadvice in async-bytecomp breaks package-install-from-buffer #47

Closed steckerhalter closed 8 years ago

steckerhalter commented 9 years ago
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  package-desc-reqs(nil)
  async-bytecomp-get-allowed-pkgs()
...
  package--compile([cl-struct-package-desc twilight-bright-theme (0 1 0) "A Emacs 24 faces port of the TextMate theme" nil nil nil "/home/reto/.emacs.d/elpa/twilight-bright-theme-0.1.0" ((:url . "https://github.com/jimeh/twilight-bright-theme.el")) nil])
  package-unpack([cl-struct-package-desc twilight-bright-theme (0 1 0) "A Emacs 24 faces port of the TextMate theme" nil single nil nil ((:url . "https://github.com/jimeh/twilight-bright-theme.el")) nil])
  package-install-from-buffer()
  call-interactively(package-install-from-buffer record nil)
  command-execute(package-install-from-buffer record)
  helm-M-x()
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

GNU Emacs 24.4.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of 2015-01-12 on babin, modified by Debian

package-install-file has the same problem as it uses package-install-from-buffer too.

Backtrace was made with https://raw.githubusercontent.com/jimeh/twilight-bright-theme.el/master/twilight-bright-theme.el

thierryvolpiatto commented 9 years ago

steckerhalter notifications@github.com writes:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil) package-desc-reqs(nil) async-bytecomp-get-allowed-pkgs()

It looks you have a package-archive-contents empty, this maybe because you didn't run package-initialize in your config file ? What happen when you eval:

(async-bytecomp-get-allowed-pkgs)

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

steckerhalter commented 9 years ago

you are right, I didn't have package-initialize in my config anymore. sorry for the noise :)

steckerhalter commented 9 years ago

actually I found out now that even if I run package-initialize it still doesn't fix the issue. package-archive-contents is empty because I'm not using any ELPA repos. my fix is currently just to ad-unadvice package--compile after helm-config forces the advice

thierryvolpiatto commented 9 years ago

steckerhalter notifications@github.com writes:

actually I found out now that even if I run package-initialize it still doesn't fix the issue. package-archive-contents is empty because I'm not using any ELPA repos.

So you have a problem in your emacs configuration somewhere. 1) Start emacs -Q 2) run package-initialize 3) eval package-archive-contents

It should be feeded.

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

steckerhalter commented 9 years ago

it's not fed because I remove the GNU ELPA from package-archives hence contents stays empty which should be a valid customization, or not?

thierryvolpiatto commented 9 years ago

steckerhalter notifications@github.com writes:

it's not fed because I remove the GNU ELPA from package-archives hence contents stays empty which should be a valid customization, or not?

It's non sense doing this unless you don't want at all using package, and even if it is the case having a value in package-archives doesn't arm. Anyway I have pushed a change that allow you to disable this with:

(setq async-bytecomp-allowed-packages nil)

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

steckerhalter commented 9 years ago

thanks. it's not nonsense because having package-archive-contents populated means that it considers theses packages if I'm using package-install-file which is not wanted in my case