progfolio / elpaca

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

void function `elpaca-ui--buttonize` #31

Closed Luis-Henriquez-Perez closed 1 year ago

Luis-Henriquez-Perez commented 1 year ago

Installing packages works fine until it stops working. I get an error saying that elpaca-ui--buttonize is void. I got the error first when I calling elpaca-try on the package solarized-theme and then when I tried installing org-auto-tangle. Now, that being said, I suspect it doesn't have to do with the specific package being installed.

Looking at the source code I see that elpaca-ui--buttonize is an alias for buttonize (in my case with emacs 27). I suspect somehow the alias wasn't compiled properly.

(defalias 'elpaca-ui--buttonize
  (with-no-warnings (if (version< emacs-version "29.1") #'button-buttonize #'buttonize)))

Here is a backtrace of me trying to install the company package. I noticed it's also mentioning a package I tried to install prior to this, lf.

Debugger entered--Lisp error: (void-function elpaca-ui--buttonize)
  elpaca-ui--buttonize(#("lf.el:1:427" 0 11 (face nil)) #f(compiled-function (&rest _) #<bytecode 0x1fde1d0d2f09>))
  #f(compiled-function (entry) #<bytecode 0x114dc5d>)((lf [#("lf" 0 2 (face default elpaca (elpaca< lf "lf" (lf :package "lf" :fetcher github :repo "alhassy/lf" :files ("*.el" "*.el.in" "dir" "*.info" "*.texi" "*.texinfo" "doc/dir" "doc/*.info" "doc/*.texi" "doc/*.texinfo" "lisp/*.el" ...)) (finished activation info byte-compilation autoloads linking cloning-deps ref-checked-out cloning queued) "/home/luis/.config/emacs/elpaca/repos/lf" "/home/luis/.config/emacs/elpaca/builds/lf" nil (("/home/luis/.config/emacs/elpaca/repos/lf/lf.el" . "/home/luis/.config/emacs/elpaca/builds/lf/lf.el")) nil (:package "lf" :fetcher github :repo "alhassy/lf" :files ("*.el" "*.el.in" "dir" "*.info" "*.texi" "*.texinfo" "doc/dir" "doc/*.info" "doc/*.texi" "doc/*.texinfo" "lisp/*.el" ...) :protocol https :remotes "origin" :inherit t :depth 1) ((elpaca< dash "dash" ... ... "/home/luis/.config/emacs/elpaca/repos/dash" "/home/luis/.config/emacs/elpaca/builds/dash" nil nil nil ... nil ... nil 0 ... t nil ...) (elpaca< s "s" ... ... "/home/luis/.config/emacs/elpaca/repos/s" "/home/luis/.config/emacs/elpaca/builds/s" nil nil nil ... nil ... nil 0 ... t nil ...)) nil nil 2 (25469 32856 655055 474000) nil #<process elpaca-clone-lf> ((finished ... "✓ 2.014 secs") (activation ... "Autoloads cached") (activation ... "Caching autoloads") (activation ... "Package build dir added to load-path") (activation ... "Activating package") (info ... "No .info files found") (info ... "Compiling Info files") (byte-compilation ... "Byte compilation complete") (byte-compilation ... "Done (Total of 1 file compiled, 1 skipped)") (byte-compilation ... "lf.el:427:1:Warning: Unused lexical variable ‘advi...") (byte-compilation ... "In toplevel form:") (byte-compilation ... "Compiling /home/luis/.config/emacs/elpaca/builds/l...") (byte-compilation ... "Compiling /home/luis/.config/emacs/elpaca/builds/l...") (byte-compilation ... "Checking /home/luis/.config/emacs/elpaca/builds/lf...") (byte-compilation ... "Byte compiling") (autoloads ... "Autoloads Generated") (autoloads ... "  INFO     Scraping files for lf-autoloads.el...do...") (autoloads ... "  INFO     Scraping files for lf-autoloads.el... ") (autoloads ... "Generating autoloads: /home/luis/.config/emacs/elp...") (linking ... "Build files linked") (linking ... "Linking build files") (cloning-deps ... "Cloning Dependencies") (ref-checked-out ... "No ref specified. Using default") (cloning ... "Remotes fetched") (cloning ... "Fetching origin") (cloning ... "Adding Remotes") (cloning ... "Resolving deltas: 100% (1/1), done.") (cloning ... "Cloning into '/home/luis/.config/emacs/elpaca/repo...") (queued ... "Package queued"))))) "byte-compilation" #("lf.el:427:1:Warning: Unused lexical variable ‘advi..." 0 58 (face elpaca-failed)) "23878.834045"]))
  mapcar(#f(compiled-function (entry) #<bytecode 0x114dc5d>) ((elpaca [... "rebuilding" "Rebuilding" "74652.378062"]) (lf [... "finished" "✓ 2.014 secs" "23878.841106"]) (lf [... "activation" "Autoloads cached" "23878.841043"]) (lf [... "activation" "Caching autoloads" "23878.840545"]) (lf [... "activation" "Package build dir added to..." "23878.840486"]) (lf [... "activation" "Activating package" "23878.840422"]) (lf [... "info" "No .info files found" "23878.840399"]) (lf [... "info" "Compiling Info files" "23878.840362"]) (lf [... "byte-compilation" "Byte compilation complete" "23878.840324"]) (lf [... "byte-compilation" "Done (Total of 1 file comp..." "23878.834065"]) (lf [... "byte-compilation" ... "23878.834045"]) (lf [... "byte-compilation" "In toplevel form:" "23878.834021"]) (lf [... "byte-compilation" "Compiling /home/luis/.conf..." "23878.755431"]) (lf [... "byte-compilation" "Compiling /home/luis/.conf..." "23878.755405"]) (lf [... "byte-compilation" "Checking /home/luis/.confi..." "23878.676771"]) (lf [... "byte-compilation" "Byte compiling" "23878.578816"]) (lf [... "autoloads" "Autoloads Generated" "23878.578797"]) (lf [... "autoloads" "  INFO     Scraping files ..." "23878.578712"]) (lf [... "autoloads" "  INFO     Scraping files ..." "23878.578688"]) (lf [... "autoloads" "Generating autoloads: /hom..." "23877.934781"]) (lf [... "linking" "Build files linked" "23877.933493"]) (lf [... "linking" "Linking build files" "23877.923880"]) (lf [... "cloning-deps" "Cloning Dependencies" "23877.922603"]) (lf [... "ref-checked-out" "No ref specified. Using de..." "23877.922551"]) (lf [... "cloning" "Remotes fetched" "23877.922479"]) (lf [... "cloning" "Fetching origin" "23877.533210"]) ...))
  elpaca-ui--byte-comp-warnings(((elpaca [... "rebuilding" "Rebuilding" "74652.378062"]) (lf [... "finished" "✓ 2.014 secs" "23878.841106"]) (lf [... "activation" "Autoloads cached" "23878.841043"]) (lf [... "activation" "Caching autoloads" "23878.840545"]) (lf [... "activation" "Package build dir added to..." "23878.840486"]) (lf [... "activation" "Activating package" "23878.840422"]) (lf [... "info" "No .info files found" "23878.840399"]) (lf [... "info" "Compiling Info files" "23878.840362"]) (lf [... "byte-compilation" "Byte compilation complete" "23878.840324"]) (lf [... "byte-compilation" "Done (Total of 1 file comp..." "23878.834065"]) (lf [... "byte-compilation" ... "23878.834045"]) (lf [... "byte-compilation" "In toplevel form:" "23878.834021"]) (lf [... "byte-compilation" "Compiling /home/luis/.conf..." "23878.755431"]) (lf [... "byte-compilation" "Compiling /home/luis/.conf..." "23878.755405"]) (lf [... "byte-compilation" "Checking /home/luis/.confi..." "23878.676771"]) (lf [... "byte-compilation" "Byte compiling" "23878.578816"]) (lf [... "autoloads" "Autoloads Generated" "23878.578797"]) (lf [... "autoloads" "  INFO     Scraping files ..." "23878.578712"]) (lf [... "autoloads" "  INFO     Scraping files ..." "23878.578688"]) (lf [... "autoloads" "Generating autoloads: /hom..." "23877.934781"]) (lf [... "linking" "Build files linked" "23877.933493"]) (lf [... "linking" "Linking build files" "23877.923880"]) (lf [... "cloning-deps" "Cloning Dependencies" "23877.922603"]) (lf [... "ref-checked-out" "No ref specified. Using de..." "23877.922551"]) (lf [... "cloning" "Remotes fetched" "23877.922479"]) (lf [... "cloning" "Fetching origin" "23877.533210"]) ...))
  #f(compiled-function () #<bytecode 0x1fde1d7e87a9>)()
  elpaca-ui--update-search-filter(#<buffer *elpaca-log*> "#latest #linked-errors")
  elpaca-log()
  elpaca-log--latest()
  elpaca-try((company :package "company" :repo "company-mode/company-mode" :fetcher github :files (:defaults "icons" ("images/small" "doc/images/small/*.png"))))
  funcall-interactively(elpaca-try (company :package "company" :repo "company-mode/company-mode" :fetcher github :files (:defaults "icons" ("images/small" "doc/images/small/*.png"))))
  call-interactively(elpaca-try nil nil)
  command-execute(elpaca-try)

Interestingly, this error doesn't happen immediately. It happens after installing a few packages. Again, not sure whether certain packages triggering this.

I tried: 1- re-evaluating this form It evaluated successfully but I kept getting the same error. 2- re-building elpaca The error doesn't let me re-build it.

Luis-Henriquez-Perez commented 1 year ago

I restarted my emacs. Installed company-mode, then installed markdown-mode. Installing company was successful. But just happened again while installing markdown-mode. Bizarrely, it referenced a package I had installed during my last emacs session (actually not sure if it was last session or current but I'll keep reporting as I learn more), enwc.

Debugger entered--Lisp error: (void-function elpaca-ui--buttonize)
  elpaca-ui--buttonize(#("enwc.el:1:55" 0 12 (face nil)) #f(compiled-function (&rest _) #<bytecode 0x1eee6c9>))
  #f(compiled-function (entry) #<bytecode 0x13c9625>)((enwc [#("enwc" 0 4 (face default elpaca (elpaca< enwc "enwc" (enwc :package "enwc" :host github :repo "emacs-straight/enwc") (finished activation info byte-compilation autoloads linking cloning-deps ref-checked-out cloning queued) "/home/luis/.config/emacs/elpaca/repos/enwc" "/home/luis/.config/emacs/elpaca/builds/enwc" nil (... ... ... ... ... ... ... ... ... ...) nil (:package "enwc" :host github :repo "emacs-straight/enwc" :protocol https :remotes "origin" :inherit t :depth 1 :files ...) nil nil nil 3 (25470 21453 259183 152000) nil #<process elpaca-clone-enwc> (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))) "byte-compilation" #("enwc.el:55:1:Error: Symbol’s value as variab..." 0 68 (face elpaca-failed)) "1094.366048"]))
  mapcar(#f(compiled-function (entry) #<bytecode 0x13c9625>) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  elpaca-ui--byte-comp-warnings((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  #f(compiled-function () #<bytecode 0x180ca35>)()
  elpaca-ui--update-search-filter(#<buffer *elpaca-log*> "#latest #linked-errors")
  elpaca-log()
  elpaca-log--latest()
  elpaca-try((markdown-mode :package "markdown-mode" :package "markdown-mode" :fetcher github :repo "jrblevin/markdown-mode" :files ("*.el" "*.el.in" "dir" "*.info" "*.texi" "*.texinfo" "doc/dir" "doc/*.info" "doc/*.texi" "doc/*.texinfo" "lisp/*.el" (:exclude ".dir-locals.el" "test.el" "tests.el" "*-test.el" "*-tests.el" "LICENSE" "README*" "*-pkg.el"))))
  funcall-interactively(elpaca-try (markdown-mode :package "markdown-mode" :package "markdown-mode" :fetcher github :repo "jrblevin/markdown-mode" :files ("*.el" "*.el.in" "dir" "*.info" "*.texi" "*.texinfo" "doc/dir" "doc/*.info" "doc/*.texi" "doc/*.texinfo" "lisp/*.el" (:exclude ".dir-locals.el" "test.el" "tests.el" "*-test.el" "*-tests.el" "LICENSE" "README*" "*-pkg.el"))))
  call-interactively(elpaca-try nil nil)
  command-execute(elpaca-try)

I am going to try bootstraping elpaca and all my packages again. I need to do so anyway because there's an issue I've been planning on making with the bootstrapping.

progfolio commented 1 year ago

Thanks for the report. I'm working on a fix for this now.

The reason you're not seeing it for every package is because that code is only called when logging byte-compilation errors. The problem is that the button-buttonize function wasn't introduced until Emacs 28 I just need to set the proper alias for Emacs 27 (if one exists, otherwise I'll alias so that the function is a no-op).

progfolio commented 1 year ago

This should be fixed as of 1c5ccec. Thanks again for the bug report. Testing appreciated.

Luis-Henriquez-Perez commented 1 year ago

I've upgraded my version of elpaca and if the error ever happens again I will notify you (or reopen this issue if it has been closed).