progfolio / elpaca

An elisp package manager
GNU General Public License v3.0
634 stars 31 forks source link

[Support]: Fresh Emacs 28 install failure #197

Closed zot closed 11 months ago

zot commented 11 months ago

Elpaca Version

Elpaca e60ab3c HEAD -> master, origin/master, origin/HEAD installer: 0.6 emacs-version: GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) git --version: git version 2.41.0

Operating System

Linux

Description

The init.el snippet in the docs uses a load-path of only ".", which does not contain use-package.el. It works if I install use-package in site-lisp and change the compilation expression from

((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
                      "--eval" "(byte-recompile-directory \".\" 0 'force)")))

to

((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "-L" "~/.emacs.d/site-lisp/use-package" "--batch"
                      "--eval" "(byte-recompile-directory \".\" 0 'force)")))

Manually installing use-package doesn't seem like a good solution to this, though -- I think it would be better to install it with (elpaca use-package) instead but compiling elpaca-use-package would have to be specifically deferred until after (elpaca use-package).

zot commented 11 months ago

Just upgraded from Emacs 28 to 29 and now I don't get that error with new installs so it's probably a compatibility issue.

progfolio commented 11 months ago

Thanks for taking the time to fill out a bug report. Unfortunately, I'm unable to reproduce your issue locally with Emacs 28.1 and 28.2 using the current installer. elapca-use-package byte-compilation expectedly fails due to use-package not being installed. After the installation script finishes, use-package is automatically installed as a dependency of elpaca-use-package and byte compiles correctly, though.

Could you please share:

Also, is Emacs blocked after this failure, so that you have to use C-g to interact with it?

Thanks

progfolio commented 11 months ago

Just upgraded from Emacs 28 to 29 and now I don't get that error with new installs so it's probably a compatibility issue.

Unlikely considering I'm unable to reproduce it locally in Docker. Glad you got it worked out, though. Thanks for letting me know.

zot commented 11 months ago

This init file works in 29 but not in 28. I'm getting different behavior in 28 now -- it had been blocking on startup, requiring a ctrl-g but now it gets up to the first use-package and then fails. Successive startups also fail at the first use of use-package.

init.txt

zot commented 11 months ago

In case you're curious -- it might be some config thing on my part since you can't reproduce

progfolio commented 11 months ago

init.txt

Thanks for sharing. One thing I notice off the bat is that lexical binding is not enabled for the file. You'll want to enable it.

This init file works in 29 but not in 28. I'm getting different behavior in 28 now -- it had been blocking on startup, requiring a ctrl-g but now it gets up to the first use-package and then fails. Successive startups also fail at the first use of use-package.

The reason that file works in 29, but not in 28 is because use-package is already installed in 29.

;; Install use-package support
(elpaca elpaca-use-package
  ;; Enable :elpaca use-package keyword.
  (elpaca-use-package-mode)
  ;; Assume :elpaca t unless otherwise specified.
  (setq elpaca-use-package-by-default t))
;(elpaca-wait)

(use-package org)

That will load the built-in version of Org rather than installing the development version. The elpaca-wait needs to be there to allow elpaca-use-package-mode to be activated before the Org declaration if you want the following line to install Org. Otherwise (use-package org) will load the built-in Org. Any subsequent use-package declaration which you expect Elpaca integration to work for will fail, too.

Let's set your personal configuration aside for a moment. Try evaluating the following test case in an Emacs 28 *scratch* buffer and sharing the output once the test finishes:

Test Case [How to run this test?](https://github.com/progfolio/elpaca/wiki/Troubleshooting#the-elpaca-test-macro) ```emacs-lisp (elpaca-test :init (elpaca elpaca-use-package (elpaca-use-package-mode) (setq elpaca-use-package-by-default t)) (elpaca-wait) (elpaca-test-log ".*")) ```
Host Env
elpacaa788378 HEAD -> master, origin/master, origin/HEAD
isntaller0.6
emacsGNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-11-02
gitgit version 2.42.0
Output ```emacs-lisp INFO Scraping files for loaddefs... INFO Scraping files for loaddefs...done GEN ../elpaca-autoloads.el Cloning into '/tmp/elpaca.uVDCvZ/elpaca/repos/elpaca'... Your branch is up to date with 'origin/master'. Checking /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-info.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-log.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-manager.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-menu-elpa.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-menu-melpa.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-menu-org.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-process.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-test.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca-ui.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/elpaca.el... Checking /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/doc... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/doc/early-init.el... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/doc/init.el... Checking /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/extensions... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/extensions/elpaca-use-package.el... Checking /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/images... Checking /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/test... Compiling /tmp/elpaca.uVDCvZ/elpaca/repos/elpaca/test/elpaca-test.el... Done (Total of 11 files compiled, 3 skipped in 4 directories) Downloading MELPA recipes... Downloading MELPA recipes...100% Downloading NonGNU-devel ELPA... Downloading GNU-devel ELPA... Downloading NonGNU ELPA... Downloading GNU ELPA... elpaca-log: ".*" " elpaca-use-package blocked Blocked by: (elpaca) 06.236914 elpaca unblocked No external dependencies 06.237172 elpaca linking Linking build files 06.237408 elpaca linking Build files linked 06.238649 elpaca autoloads Generating autoloads: /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca 06.239261 elpaca autoloads INFO Scraping files for loaddefs... 06.341509 elpaca autoloads INFO Scraping files for loaddefs...done 06.352167 elpaca autoloads GEN elpaca-autoloads.el 06.352583 elpaca autoloads Autoloads Generated 06.355266 elpaca byte-compilation Byte compiling 06.355688 elpaca byte-compilation Checking /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca... 06.409814 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-autoloads.el... 06.414346 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-info.el... 06.414731 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-log.el... 06.501175 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-manager.el... 06.507584 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-menu-elpa.el... 06.515629 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-menu-melpa.el... 06.516141 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-menu-org.el... 06.525751 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-process.el... 06.526135 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-test.el... 06.526416 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca-ui.el... 06.535819 elpaca byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca.el... 06.547468 elpaca byte-compilation Done (Total of 10 files compiled, 1 skipped) 06.616137 elpaca byte-compilation Byte compilation complete 06.619842 elpaca info Compiling Info files 06.620244 elpaca info Info compiled 06.790209 elpaca info Installing Info files 06.790693 elpaca info /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca/elpaca.info 06.791300 elpaca info Info installed 06.792329 elpaca info Adding Info path 06.793234 elpaca-use-package unblocked Unblocked by: elpaca 06.793551 elpaca-use-package linking Linking build files 06.794203 elpaca-use-package linking Build files linked 06.794593 elpaca-use-package autoloads Generating autoloads: /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca-use-package 06.795057 elpaca finished ✓ 0.570 secs 06.795365 elpaca-use-package autoloads INFO Scraping files for loaddefs... 06.888658 elpaca-use-package autoloads INFO Scraping files for loaddefs...done 06.892460 elpaca-use-package autoloads GEN elpaca-use-package-autoloads.el 06.892845 elpaca-use-package autoloads Autoloads Generated 06.893153 elpaca-use-package byte-compilation Byte compiling 06.893426 elpaca-use-package byte-compilation Checking /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca-use-package... 06.944207 elpaca-use-package byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca-use-package/elpaca-use-package-autoloads.el... 06.948945 elpaca-use-package byte-compilation Compiling /tmp/elpaca.uVDCvZ/elpaca/builds/elpaca-use-package/elpaca-use-package.el... 06.950109 elpaca-use-package byte-compilation Done (Total of 1 file compiled, 1 skipped) 06.959124 elpaca-use-package byte-compilation Byte compilation complete 06.960787 elpaca-use-package info Installing Info files 06.961165 elpaca-use-package info No Info dir file found 06.961777 elpaca-use-package activation Activating package 06.962046 elpaca-use-package activation Package build dir added to load-path 06.962345 elpaca-use-package activation Caching autoloads 06.962619 elpaca-use-package activation Autoloads cached 06.962991 elpaca-use-package finished ✓ 0.739 secs 06.963281 " Test Env Elpaca a788378 HEAD -> master, origin/master, origin/HEAD installer: 0.6 emacs-version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-11-02 git --version: git version 2.42.0 ```
zot commented 11 months ago

Thanks for those pointers!

Uncommenting that elpaca-wait again made the rest of my config start up. I have the vast majority of my config in an org file so that makes sense (I commented it out when I was trying to diagnose the failures).