Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doom doctor (geiser-activate-implementation) function definition is void with (scheme +guile) #7472

Closed
4 tasks done
offsetcyan opened this issue Sep 29, 2023 · 21 comments
Closed
4 tasks done
Labels
is:bug Something isn't working as intended module:lang/scheme Pertains to Doom's :lang scheme module

Comments

@offsetcyan
Copy link

offsetcyan commented Sep 29, 2023

I confirm that...

  • I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.
  • I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.
  • The issue can be reproduced on the latest available commit of Doom.
  • The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)

Expected behavior

When doom doctor is run, I expect to see an output of packages and configuration suggested to complete Doom's feature set as an IDE, if the configuration in init.el is correct.

Current behavior

doom doctor raises an unexpected error with respect to geiser if (scheme +guile) is part of the synced init.el (.emacs.d/.local/etc/@/init.29.el). The error is not raised if just (scheme) is set.

In .local/etc/@/init.29.el, the function definition (defun geiser-activate-implementation ...) is on line 17831, but the call to it with (geiser-activate-implementation 'guile) was on line 17619, so no wonder it wasn't defined.

  x There was an unexpected runtime error
    Message: Symbol's function definition is void
    Details: (geiser-activate-implementation)
    Backtrace:
      (geiser-activate-implementation 'guile)
      (load-with-code-conversion "/home/user/.emacs.d/.local/etc/@/init.29.el" "/home/user/.emacs.d/.local/etc/@/init.29.el" t t)
      (load "/home/user/.emacs.d/.local/etc/@/init.29.el" noerror nomessage)
      ... ;; full log attached

cli.doom.230929033925.2850084.error.txt

Steps to reproduce

  1. In Doom's init.el, enable (scheme +guile).
  2. doom sync.
  3. doom doctor will error.

System Information

https://pastebin.com/KufKL6HA

@offsetcyan offsetcyan added is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels Sep 29, 2023
@rootex-
Copy link

rootex- commented Nov 7, 2023

Confirm, I have the same behavior

@easbarba
Copy link
Contributor

easbarba commented Nov 12, 2023

Same issue here with (scheme +flymake +guile +chicken), but fixed after running doom purge. :)

@kGAr6Naaes
Copy link

Same here, for now I'm gonna comment out Scheme.

I tried

doom sync
doom purge

as @easbarba suggested and it didn't work.

@OrionRandD
Copy link

Confirm, I have the same behavior

me too...

GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2023-08-30, modified by Debian

in my init I have:
;; (scheme +chez +guile +mit +racket +stklos) ; a fully conniving family of lisps
(scheme +guile +mit +racket +stklos) ; a fully conniving family of lisps

and this is the error:

Checking Doom Emacs...
x There was an unexpected runtime error
Message: Symbol's function definition is void
Details: (geiser-activate-implementation)
Backtrace:
(geiser-activate-implementation 'guile)

I have tried a few fixes, but to no avail...
But, came to this tread and now I know it seems to be a bug or sort of...
:(

@hlissner hlissner added module:lang/scheme Pertains to Doom's :lang scheme module and removed needs-triage Issue hasn't been assessed yet labels Nov 29, 2023
@hlissner hlissner added this to the modules v23.10 milestone Nov 29, 2023
@hlissner
Copy link
Member

As of 87f6f7a this issue should be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

@pfmaggi
Copy link

pfmaggi commented Nov 29, 2023

I've now this error (I didn't experience it in the past).

Version

$ doom version                                                                                                       
GNU Emacs     v29.1            nil
Doom core     v3.0.0-pre       HEAD -> master 87f6f7ab 2023-11-29 13:41:23 -0500
Doom modules  v23.09.0-pre     HEAD -> master 87f6f7ab 2023-11-29 13:41:23 -0500``

in init.elI have:

(scheme +guile)      ; a fully conniving family of lisps

running doom doctor:

$ doom doctor                                                                                                                                  
The doctor will see you now...                                                                                                                                                                     
                                                                                                                                                                                                   
> Checking your Emacs version...                                                                                                                                                                   
> Checking for Doom's prerequisites...                                                                                                                                                             
> Checking for Emacs config conflicts...                                                                                                                                                           
> Checking for missing Emacs features...                                                                                                                                                           
  ! Emacs was not built with native compilation support                                                                                                                                            
    Users will see a substantial performance gain by building Emacs with                                                                                                                           
    native compilation support, availible in emacs 28+.You must install a
    prebuilt Emacs binary with this included, or compile Emacs with the
    --with-native-compilation option.
> Checking for private config conflicts...
> Checking for common environmental issues...
! Detected Fish as your $SHELL
  Fish (and possibly other non-POSIX shells) is known to inject garbage
  output into some of the child processes that Emacs spawns. Many Emacs
  packages/utilities will choke on this output, causing unpredictable
  issues. To get around this, either:
   
    - Add the following to $DOOMDIR/config.el:
   
      (setq shell-file-name (executable-find "bash"))
   
    - Or change your default shell to a POSIX shell (like bash or zsh)
      and explicitly configure your terminal apps to use the shell you
      want.
   
  If you opt for option 1 and use one of Emacs' terminal emulators, you
  will also need to configure them to use Fish, e.g.
   
    (setq-default vterm-shell (executable-find "fish"))
   
    (setq-default explicit-shell-file-name (executable-find "fish"))
   
> Checking for stale elc files...
> Checking for problematic git global settings...
> Checking Doom Emacs...
  x There was an unexpected runtime error
    Message: Symbol's function definition is void
    Details: (geiser-activate-implementation)
    Backtrace:
      (geiser-activate-implementation 'guile)
      (eval-buffer #<buffer  *load*-860382> nil "/home/pmaggi/.config/emacs/.local/etc/@/init.29.el" nil t)
      (load-with-code-conversion "/home/pmaggi/.config/emacs/.local/etc/@/init.29.el" "/home/pmaggi/.config/emacs/.local/etc/@/init.29.el" t t)
      (load "/home/pmaggi/.config/emacs/.local/etc/@/init.29.el" noerror nomessage)
      (condition-case e (load path noerror 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (setq path (locate-file path load-path (get-load-suffixes))) (signal (cond ...
      (doom-load "/home/pmaggi/.config/emacs/.local/etc/@/init.29.el" noerror)
      (let (kill-emacs-query-functions kill-emacs-hook) (doom-load init-file 'noerror) (doom-initialize-packages))
      (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-file) nil (user-error "Profile init file hasn't been generated. Did you forgot to run 'doom sync'?")) (let (kill-emac...
      (progn (doom-require 'doom-profiles) (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-file) nil (user-error "Profile init file hasn't been generated. Did you forgot t...
      (if noninteractive (progn (doom-require 'doom-profiles) (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-file) nil (user-error "Profile init file hasn't been generate...
      (eval-buffer #<buffer  *load*-657611> nil "/home/pmaggi/.config/emacs/lisp/doom-start.el" nil t)
      (load-with-code-conversion "/home/pmaggi/.config/emacs/lisp/doom-start.el" "/home/pmaggi/.config/emacs/lisp/doom-start.el" nil t)
    ! Wrote extended backtrace to ~/.config/emacs/.local/state/logs/cli.doom.231129211241.17121.error
 

I use the fish shell but even setting (setq shell-file-name (executable-find "bash")) doesn't seem to solve this issue.

@hlissner hlissner reopened this Nov 29, 2023
@hlissner
Copy link
Member

Ah, I can reproduce this. Appears to be a build order issue. geiser-guile calls (geiser-activate-implementation 'guile) in its autoloads file, before the geiser package has a chance to define the geiser-activate-implementation function. Looking into a solution.

@hlissner
Copy link
Member

Should be fixed in f9c2397. Let me know if that isn't the case!

peterhoeg pushed a commit to peterhoeg/doomemacs that referenced this issue Nov 30, 2023
emacs-geiser/chez@246ec4c8bc4e -> emacs-geiser/chez@605a81ff7b2d
emacs-geiser/geiser@e54d5e6dc659 -> emacs-geiser/geiser@49d12a14482c
emacs-geiser/guile@24ce15de235c -> emacs-geiser/guile@ee33af6b4ef8
flatwhatson/flycheck-guile@e23a4d781317 -> flatwhatson/flycheck-guile@dd7bbdc48fd2
flatwhatson/scheme-mode@aaef1f88cc34 -> flatwhatson/scheme-mode@51e586e5f1dd

- Lazy autoloads hack for geiser is no longer needed (see
  https://gitlab.com/emacs-geiser/geiser/-/commit/47bb86d6829ffa81ec021ee6217379b216d95bfc)
- (doomemacs#7472) Fixes geiser-activate-implementation errors from `doom doctor`

Fix: doomemacs#7472
Ref: https://gitlab.com/emacs-geiser/geiser/-/commit/47bb86d6829ffa81ec021ee6217379b216d95bfc
peterhoeg pushed a commit to peterhoeg/doomemacs that referenced this issue Nov 30, 2023
Package autoloads should be assembled in the order they're
installed/built, so that dependencies between them (such as the case
where geiser-* packages call geiser-activate-implementation, which is
defined in geiser.el's autoloads file -- see doomemacs#7472) don't throw errors.

Fix: doomemacs#7472
Amend: 87f6f7a
@hugonobrega
Copy link
Contributor

Should be fixed in f9c2397. Let me know if that isn't the case!

I am still seeing this issue on a fully up-to-date doom (rebuilt all packages too)

@hugonobrega
Copy link
Contributor

Should be fixed in f9c2397. Let me know if that isn't the case!

I am still seeing this issue on a fully up-to-date doom (rebuilt all packages too)

Additional info: nuked my doom emacs installation, reinstalled from scratch and still getting the same issue

@hugonobrega
Copy link
Contributor

I'm slightly puzzled as to what may have happened, but after having the :lang (scheme +guile) turned off for a few days because of this issue, I just re-enabled it and didn't get the issue this time.

@hpfr
Copy link
Contributor

hpfr commented Dec 10, 2023

It seems like there is still an issue with (at least) geiser-mit.

Debugger entered--Lisp error: (void-function geiser-impl--add-to-alist)
  geiser-impl--add-to-alist(regexp "\\.pkg$" mit t)
  byte-code("\300\301\302\303\304$\210\305\303!\207" [geiser-impl--add-to-alist regexp "\\.pkg$" mit t geiser-activate-implementation] 5)
  load("/home/lh/.config/emacs/.local/etc/@/init.29.elc" noerror nomessage nosuffix)
  (progn (load init-file-name 'noerror 'nomessage 'nosuffix))
  (if init-file-name (progn (load init-file-name 'noerror 'nomessage 'nosuffix)))
  (let ((init-file-name (file-name-concat doom-profile-dir (format "init.%d.elc" emacs-major-version)))) (setq user-init-file t) (if init-file-name (progn (load init-file-name 'noerror 'nomessage 'nosuffix))) (if (eq user-init-file t) (progn (signal 'doom-nosync-error (list init-file-name)))) (setq user-init-file (concat (string-remove-suffix ".elc" user-init-file) ".el")))
  (progn (let ((init-file-name (file-name-concat doom-profile-dir (format "init.%d.elc" emacs-major-version)))) (setq user-init-file t) (if init-file-name (progn (load init-file-name 'noerror 'nomessage 'nosuffix))) (if (eq user-init-file t) (progn (signal 'doom-nosync-error (list init-file-name)))) (setq user-init-file (concat (string-remove-suffix ".elc" user-init-file) ".el"))))
  (if init-file-user (progn (let ((init-file-name (file-name-concat doom-profile-dir (format "init.%d.elc" emacs-major-version)))) (setq user-init-file t) (if init-file-name (progn (load init-file-name 'noerror 'nomessage 'nosuffix))) (if (eq user-init-file t) (progn (signal 'doom-nosync-error (list init-file-name)))) (setq user-init-file (concat (string-remove-suffix ".elc" user-init-file) ".el")))))
  (condition-case error (if init-file-user (progn (let ((init-file-name (file-name-concat doom-profile-dir (format "init.%d.elc" emacs-major-version)))) (setq user-init-file t) (if init-file-name (progn (load init-file-name 'noerror 'nomessage 'nosuffix))) (if (eq user-init-file t) (progn (signal 'doom-nosync-error (list init-file-name)))) (setq user-init-file (concat (string-remove-suffix ".elc" user-init-file) ".el"))))) ((debug error) (display-warning 'initialization (format-message "An error occurred while loading `%s':\n\n%s%s%s\n\nTo ..." user-init-file (get (car error) 'error-message) (if (cdr error) ": " "") (mapconcat #'(lambda (s) (prin1-to-string s t)) (cdr error) ", ")) :warning) (setq init-file-had-error t)))
  (let ((debug-on-error debug-on-error-initial)) (condition-case error (if init-file-user (progn (let ((init-file-name (file-name-concat doom-profile-dir ...))) (setq user-init-file t) (if init-file-name (progn (load init-file-name ... ... ...))) (if (eq user-init-file t) (progn (signal ... ...))) (setq user-init-file (concat (string-remove-suffix ".elc" user-init-file) ".el"))))) ((debug error) (display-warning 'initialization (format-message "An error occurred while loading `%s':\n\n%s%s%s\n\nTo ..." user-init-file (get (car error) 'error-message) (if (cdr error) ": " "") (mapconcat #'(lambda ... ...) (cdr error) ", ")) :warning) (setq init-file-had-error t))) (or (eq debug-on-error debug-on-error-initial) (progn (setq debug-on-error-should-be-set t) (setq debug-on-error-from-init-file debug-on-error))))
  (let ((debug-on-error-from-init-file nil) (debug-on-error-should-be-set nil) (debug-on-error-initial (if (eq init-file-debug t) 'startup init-file-debug)) (inhibit-null-byte-detection t)) (let ((debug-on-error debug-on-error-initial)) (condition-case error (if init-file-user (progn (let ((init-file-name ...)) (setq user-init-file t) (if init-file-name (progn ...)) (if (eq user-init-file t) (progn ...)) (setq user-init-file (concat ... ".el"))))) ((debug error) (display-warning 'initialization (format-message "An error occurred while loading `%s':\n\n%s%s%s\n\nTo ..." user-init-file (get (car error) 'error-message) (if (cdr error) ": " "") (mapconcat #'... (cdr error) ", ")) :warning) (setq init-file-had-error t))) (or (eq debug-on-error debug-on-error-initial) (progn (setq debug-on-error-should-be-set t) (setq debug-on-error-from-init-file debug-on-error)))) (if debug-on-error-should-be-set (progn (setq debug-on-error debug-on-error-from-init-file))))
  startup--load-user-init-file@init-doom(#f(compiled-function () #<bytecode -0x15c3d71e1ab625c0>) #f(compiled-function () #<bytecode 0x1dfd72a04e003614>) t)
  apply(startup--load-user-init-file@init-doom (#f(compiled-function () #<bytecode -0x15c3d71e1ab625c0>) #f(compiled-function () #<bytecode 0x1dfd72a04e003614>) t))
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x15c3d71e1ab625c0>) #f(compiled-function () #<bytecode 0x1dfd72a04e003614>) t)
  command-line()
  normal-top-level()

I checked ~/.config/emacs/.local/etc/\@/init.29.el and its autoloads are still added before geiser’s. Here is the installation order:

0 2023-12-10 17:32:28 $ doom sync
> Synchronizing "default" profile...
  > Regenerating envvars file
    ✓ Generated ~/.config/emacs/.local/env
  > Installing packages...
    > Building geiser-mit...
    - Checked out geiser: 49d12a14482ce9a193c049a5ccdd2fed90b0bdbe
    > Building geiser-mit > Building geiser...
    > Building geiser-mit...
    > Building geiser-guile...
    - Checked out macrostep-geiser: f6a2d5bb96ade4f23df557649af87ebd0cc45125
    > Building macrostep-geiser...
    ✓ Installed 4 packages

My lang/scheme/packages.el:

;; -*- no-byte-compile: t; -*-
;;; lang/scheme/packages.el

(when (package! geiser
        :pin "49d12a14482ce9a193c049a5ccdd2fed90b0bdbe")
  (package! macrostep-geiser
    :pin "f6a2d5bb96ade4f23df557649af87ebd0cc45125")
  (package! geiser-guile
    :pin "ee33af6b4ef8fdaccbdf93c62b50fe17c07a1ade")
  (package! geiser-mit
    :pin "4e90e9ae815e89f3540fb9644e6016c663ef5765"))

Generating autoloads based on the order of straight--build-cache seems kind of brittle? I’m not familiar enough to suggest an alternative, unfortunately

@Ecsodikas
Copy link

I also get the same error after enabling (scheme +chicken) in the init.el file.

➜  ~ doom doctor     
The doctor will see you now...

> Checking your Emacs version...
> Checking for Doom's prerequisites...
> Checking for Emacs config conflicts...
> Checking for missing Emacs features...
> Checking for private config conflicts...
> Checking for common environmental issues...
> Checking for stale elc files...
> Checking for problematic git global settings...
> Checking Doom Emacs...
  x There was an unexpected runtime error
    Message: Symbol's function definition is void
    Details: (geiser-activate-implementation)
    Backtrace:
      (geiser-activate-implementation 'chicken)
      (load-with-code-conversion "/home/ecsodikas/.config/emacs/.local/etc/@/init.29.el" "/home/ecsodikas/.config/emacs/.local/etc/@/init.29.el" t t)
      (load "/home/ecsodikas/.config/emacs/.local/etc/@/init.29.el" noerror nomessage)
      (condition-case e (load path noerror 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (setq path (locate-file path load-path (get-load-suffixes))) (signal (cond ((not (a...
      (doom-load "/home/ecsodikas/.config/emacs/.local/etc/@/init.29.el" noerror)
      (let (kill-emacs-query-functions kill-emacs-hook) (doom-load init-file 'noerror) (doom-initialize-packages))
      (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-file) nil (user-error "Profile init file hasn't been generated. Did you forgot to run 'doom sync'?")) (let (kill-emacs-query-...
      (progn (doom-require 'doom-profiles) (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-file) nil (user-error "Profile init file hasn't been generated. Did you forgot to run 'd...
      (if noninteractive (progn (doom-require 'doom-profiles) (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-file) nil (user-error "Profile init file hasn't been generated. Did y...
      (load-with-code-conversion "/home/ecsodikas/.config/emacs/lisp/doom-start.el" "/home/ecsodikas/.config/emacs/lisp/doom-start.el" nil t)
      (require doom-start)
      (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (require 'doom-start) (doom-print (doom-print--format...
    ! Wrote extended backtrace to ~/.config/emacs/.local/state/logs/cli.doom.231214004235.50442.error

I was running Emacs 27 before and was wondering if this was the issue, but I upgraded to 29 and did a fresh doom sync and sadly the error persists. Maybe this helps debugging the issue.

@jidibinlin
Copy link

I got this errors too

@reyman
Copy link

reyman commented Dec 21, 2023

Same problem here !


> Checking Doom Emacs...
  x There was an unexpected runtime error
    Message: Symbol's function definition is void
    Details: (geiser-activate-implementation)
    Backtrace:
      (geiser-activate-implementation 'guile)
      (load-with-code-conversion "/home/reyman/.emacs.d/.local/etc/@/init.29...
      (load "/home/reyman/.emacs.d/.local/etc/@/init.29.el" noerror nomessage)
      (condition-case e (load path noerror 'nomessage) ((debug doom-error) (...
      (doom-load "/home/reyman/.emacs.d/.local/etc/@/init.29.el" noerror)
      (let (kill-emacs-query-functions kill-emacs-hook) (doom-load init-file...
      (let ((init-file (doom-profile-init-file))) (if (file-exists-p init-fi...
      (progn (doom-require 'doom-profiles) (let ((init-file (doom-profile-in...
      (if noninteractive (progn (doom-require 'doom-profiles) (let ((init-fi...
      (load-with-code-conversion "/home/reyman/.emacs.d/lisp/doom-start.el" ...
      (require doom-start)
      (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent ...
    ! Wrote extended backtrace to ~/.emacs.d/.local/state/logs/cli.doom.231221102719.19069.error

@hlissner here the full log if that help : https://filesender.renater.fr/?s=download&token=fcc1d19e-b0ed-4148-8f86-164488f7f5f2

@rubin55
Copy link

rubin55 commented Dec 24, 2023

@hlissner I've been getting this error for the last two months. Just now I rm -rf ~/.emacs.d/.local, I git pull and am on 03d692f129633e3bf0bd100d91b3ebf3f77db6d1. I then doom upgrade and let it finish. I immediately get the error after starting emacs.

(update: you asked to let you know if people are still experiencing this issue! Answer is an unfortunate yes. Thanks for a great editor in any case!)

@flatwhatson
Copy link
Contributor

flatwhatson commented Jan 2, 2024

I'm also seeing this issue on the latest master 03d692f. Using the following workaround:

;;; .local/etc/@/init.29.d/85-loaddefs.hacks.el
(require 'geiser-autoloads)
(require 'geiser-guile-autoloads)

Make sure you've put it in the correct init.XY.d for your emacs version, and run doom sync afterwards to recompile the init files before running emacs.

@OrionRandD
Copy link

I'm also seeing this issue on the latest master 03d692f. Using the following workaround:

;;; .local/etc/@/init.29.d/85-loaddefs.hacks.el
(require 'geiser-autoloads)
(require 'geiser-guile-autoloads)

Make sure you've put it in the correct init.XY.d for your emacs version, and run doom sync afterwards to recompile the init files before running emacs.

The hack seems to have worked here...
Thx.

@viperML
Copy link

viperML commented Feb 8, 2024

Still an issue, maybe should be reopened

@sausageandbiscuits
Copy link

Got the same error. Tried removing +racket running doom sync, re-adding +racket , doing doom sync again and then it worked for me.

@Laevos
Copy link

Laevos commented May 7, 2024

I'm also seeing this issue on the latest master 03d692f. Using the following workaround:

;;; .local/etc/@/init.29.d/85-loaddefs.hacks.el
(require 'geiser-autoloads)
(require 'geiser-guile-autoloads)

Make sure you've put it in the correct init.XY.d for your emacs version, and run doom sync afterwards to recompile the init files before running emacs.

Tried this on a fresh doom-emacs install, unfortunately it does not seem to resolve the issue in my case

ray1729 pushed a commit to ray1729/doomemacs that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working as intended module:lang/scheme Pertains to Doom's :lang scheme module
Projects
Archived in project
Development

No branches or pull requests