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

Failed to byte-compile: Debugger entered--Lisp error: (void-variable this-file) #489

Closed
hrehfeld opened this issue Aug 23, 2021 · 5 comments

Comments

@hrehfeld
Copy link

hrehfeld commented Aug 23, 2021

I don't get a backtrace, only this message. However, I suspect this is caused by https://github.com/raxod502/radian/blob/a1bb6c26d296725fc798e9db935ed409c7c9fb25/emacs/init.el#L68

as it is the only occurrence of that string in my .emacs.d. In case of an error there, it would error out again on the variable?

Interestingly, when I try to work-around by using:

(unless link-target
          (error "Init-file is not a symlink: %s" (or user-init-file
                                                     load-file-name
                                                     buffer-file-name)))

the compilation error persists: Failed to byte-compile: Debugger entered--Lisp error: (error "Init-file is not a symlink: /home/hrehfeld/.emacs....")

Any way how I can get stack traces for these compilation errors?

@raxod502
Copy link
Member

raxod502 commented Nov 7, 2021

Sorry for the extensive delay on response here. You should be able to get a full error message if you run make compile from the command line.

@hrehfeld
Copy link
Author

Hmm, I cannot reproduce, so I'm closing.

@hrehfeld
Copy link
Author

was this fixed in c8a2e92?

@hrehfeld
Copy link
Author

hrehfeld commented Dec 16, 2021

Ironically, I don't get an error message with make compile either :(

$ make compile                    
Loading /home/hrehfeld/.emacs.d/my-init.el (source)...
Loading /home/hrehfeld/.emacs.d/var/recentf-save.el (source)...
Cleaning up the recentf list...
Cleaning up the recentf list...done (0 removed)
Created cite link.
Created citet link.
Created tag link.
Package cl is deprecated
Package rfc2368 is deprecated
Saving all Org buffers...
my-save-some-buffers
Saving all Org buffers... done
make: *** [Makefile:25: compile] Error 1

Interestingly, it seems that some of the greps in byte-compile.bash is failing, as

$ emacs --batch \
       --eval "(setq straight-safe-mode t)"                  \
       --load "$HOME/.emacs.d/init.el"                       \
       --funcall radian-batch-byte-compile

works just fine

@raxod502
Copy link
Member

Hmm, I'm not sure when this was fixed, but that commit does look like a good candidate. The reason you're seeing a compilation error is because the way it's configured currently, any byte-compilation warnings are treated as an error. So, because of the messages like Package cl is deprecated, the grep statement sees that there was output and fails the build.

This has been rather annoying even to me, despite that having no warnings is a great thing. If you think it would be a good idea, I wouldn't object to making it configurable, so that warnings can be treated as non-fatal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants