progfolio / elpaca

An elisp package manager
GNU General Public License v3.0
621 stars 30 forks source link

Fails to install any package. #37

Closed wamyuk closed 1 year ago

wamyuk commented 1 year ago

Emacs Version

GNU Emacs 28.2 build 2 x86_64-unknown-linux-gnu GTK+ Version 3.24.34 cairo version 1.16.0

build-options: cairo gif gmp gnutls harfbuzz jpeg json m17n nativecomp png sound svg tiff xml xpm ~dbus ~imagemagick

Operating System

Void Linux 6.0.10_1 x86_64 GNU/Linux

Bug Description

I tried installing several different packages but ran into this same issue.


Did a fresh start with just two files init.el and early-init.el with the following contents:

;; init.el
<elpaca bootstrapping snippet>
(elpaca nano-theme)
(load-theme 'nano-dark t)

;; early-init.el
(setq package-enable-at-startup nil)

Once fetching package sources completes I get the error mentioned in the log output.

elpaca-log shows the following:

Package Status Info Time ▼ 
elpaca                         queued               Package queued                                                                   27.220514
nano-theme                     queued               Package queued                                                                   27.220894

Then if I do elpaca-rebuild nano-theme I get:

Package Status Info Time ▼ 
nano-theme                     cloning              Resolving deltas: 100% (2/2), done.                                              927.461470
nano-theme                     cloning              Adding Remotes                                                                   927.484334
nano-theme                     cloning              Remotes fetched                                                                  928.355380
nano-theme                     ref-checked-out      remote's HEAD checked out                                                        928.355432
nano-theme                     cloning-deps         Cloning Dependencies                                                             928.355449
nano-theme                     cloning-deps         No external dependencies detected                                                928.355679
nano-theme                     linking              Linking build files                                                              928.355704
nano-theme                     linking              Build files linked                                                               928.357357
nano-theme                     autoloads            Generating autoloads: /home/snakebite/.config/emacs/elpaca/builds/nano-theme     928.357678
nano-theme                     autoloads              INFO     Scraping files for nano-theme-autoloads.el...                         928.650038
nano-theme                     autoloads              INFO     Scraping files for nano-theme-autoloads.el...done                     928.658779
nano-theme                     autoloads            Autoloads Generated                                                              928.713499
nano-theme                     byte-compilation     Byte compiling                                                                   928.713537
nano-theme                     byte-compilation     Checking /home/user/.config/emacs/elpaca/builds/nano-theme...               928.846052
nano-theme                     byte-compilation     Compiling /home/user/.config/emacs/elpaca/builds/nano-theme/nano-dark-theme.el... 928.871431
nano-theme                     byte-compilation     Compiling /home/user/.config/emacs/elpaca/builds/nano-theme/nano-light-theme.el... 928.936611
nano-theme                     byte-compilation     Compiling /home/user/.config/emacs/elpaca/builds/nano-theme/nano-theme-autoloads.el... 928.936638
nano-theme                     byte-compilation     Compiling /home/user/.config/emacs/elpaca/builds/nano-theme/nano-theme-support.el... 928.936657
nano-theme                     byte-compilation     In nano-mode:                                                                    928.936672
nano-theme                     byte-compilation     nano-theme-support.el:9:379 Warning: assignment to free variable                 928.936688
nano-theme                     byte-compilation         ‘default-major-mode’                                                         928.936702
nano-theme                     byte-compilation     nano-theme-support.el:9:388 Warning: assignment to free variable                 928.936717
nano-theme                     byte-compilation         ‘auto-fill-mode’                                                             928.936730
nano-theme                     byte-compilation     In nano-new-frame:                                                               928.936745
nano-theme                     byte-compilation     nano-theme-support.el:10:464 Warning: Unused lexical variable                    928.936759
nano-theme                     byte-compilation         `background-mode'                                                            928.936779
nano-theme                     byte-compilation     nano-theme-support.el:26:464 Warning: Unused lexical variable                    928.936795
nano-theme                     byte-compilation         `selected-frame'                                                             928.936811
nano-theme                     byte-compilation     nano-theme-support.el:26:465 Warning: Unused lexical variable                    928.936826
nano-theme                     byte-compilation         `nano-theme-frame-only'                                                      928.936841
nano-theme                     byte-compilation     Compiling /home/user/.config/emacs/elpaca/builds/nano-theme/nano-theme.el... 928.936855
nano-theme                     byte-compilation     Done (Total of 4 files compiled, 1 skipped)                                      928.946514
nano-theme                     byte-compilation     Byte compilation complete                                                        928.946582
nano-theme                     info                 Compiling Info files                                                             928.946604
nano-theme                     info                 makeinfo executable not found                                                    928.946614
nano-theme                     activation           Activating package                                                               928.946639
nano-theme                     activation           Package build dir added to load-path                                             928.946669
nano-theme                     activated            Package activated                                                                928.947355
nano-theme                     finished             ✓ 4.031 secs                                                                     928.947399

Now with M-x customize-themes I'm able to activate the theme, but when I restart emacs I again come across the same error mentioned in log output. Although ".config/emacs/elpaca/builds/nano-theme/" has all related theme files.

elpaca-log again shows the same queued status:

Package Status Info Time ▼ 
elpaca                         queued               Package queued                                                                   27.220514
nano-theme                     queued               Package queued                                                                   27.220894

I tried (elpaca-use-package nano-theme) but got same results. I also got this same issue when I tried it in termux on android phone.

Relevant log output

Debugger entered--Lisp error: (error "Unable to find theme file for ‘nano-dark’")
  error("Unable to find theme file for `%s'" nano-dark)
  load-theme(nano-dark t)
  load-with-code-conversion("/home/user/.config/emacs/init.el" "/home/user/.config/emacs/init.el" t t)
  load("/home/user/.config/emacs/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1aa15021294705b2>) #f(compiled-function () #<bytecode 0x4d12c0e0e454f0b>) t)
  command-line()
  normal-top-level()

Edit: added build options

progfolio commented 1 year ago

Thanks for the detailed report. Package installation happens asynchronously, so the code you want to run after the package is installed or activated should be passed as the BODY of the elpaca macro.

(elpaca nano-theme
  (load-theme 'nano-dark t)) 

See also: https://github.com/progfolio/elpaca#why-did-my-init-file-execute-out-of-order

wamyuk commented 1 year ago

That resolved my issue, thank you. :)