jamescherti / compile-angel.el

Automatically Compile Elisp files (auto-compile alternative)
GNU General Public License v3.0
25 stars 2 forks source link

Reports file not found, but #1

Closed artelse closed 14 minutes ago

artelse commented 4 hours ago

Installed your package and it seems to work fine. However, in the *Messages* buffer, it reports it cannot find a file which lives in a lisp folder for my custom functions. The folder is set on load-path and all files in there are byte compiled and also natively compiled. The path it reports is just the filename prefixed with my home folder, not the emacs directory.

jamescherti commented 3 hours ago

Thank you for submitting an issue report. Your input will help improve compile-angel for the specific case that caused this issue in your configuration.

Could you please:

  1. Upgrade compile-angel to the latest version. MELPA
  2. Add the following to your Emacs configuration before calling (compile-angel-on-load-mode):

     (setq compile-angel-debug t)

    Here is an example:

     (use-package compile-angel
       :ensure t
       :demand t
       :config
       (setq compile-angel-debug t)
       (compile-angel-on-load-mode)
       (add-hook 'emacs-lisp-mode-hook #'compile-angel-on-save-local-mode))
  1. Restart Emacs.

  2. Then:

    • Send me the lines related to the files that fail to compile from the buffer: *compile-angel:debug*.
    • Send me the lines you are using to add custom paths to the load-path (e.g., (push "the-path" load-path)).
artelse commented 2 hours ago

Alright. This is reported in *messages* as a warning:

[compile-angel] Warning: The file does not exist: /home/artelse/ae-org-link-copy.el
Loading /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el (source)...done

and this in *compile-angel:debug*:

LOAD: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el (string)
COMPILATION ARGS: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el | nil
Byte and Native compilation: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el
Start: Byte-compilation: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el -> /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.elc
Byte-compilation Ignored (up-to-date): /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el
Native-compilation ignored (Reason: JIT compilation will do it): /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el
compile-angel--hook-after-load-functions: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el
compile-angel--hook-after-load-functions: COMPILE: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el
COMPILATION ARGS: /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el | nil
SKIP (In the skip hash list): /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el | nil
SKIP (Does not need compilation): /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el | nil

And load-path config: (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))

I moved it to before compile-angel package definition, but this didn't resolve the issue.

jamescherti commented 1 hour ago
  1. Does the file /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.elc exist?

Could you send me the output of the following command?

ls -l /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.elc /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.elc

(I would like to verify if the file is up to date.)

  1. Could you also try the latest version of compile-angel from the Git repository (main branch)? I just pushed some updates that might fix the issue.

  2. How do you load ae-org-link-copy? Using load with the full path or require?

artelse commented 28 minutes ago
  1. yes
    -rw-rw-r-- 1 artelse artelse 901 Nov 24 14:12 /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.elc
    -rw-rw-r-- 1 artelse artelse 901 Nov 24 14:12 /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.elc
  2. done The update resolves the issue: Loading /home/artelse/.config/emacs/aemacs/lisp/ae-org-link-copy.el (source)...done
  3. I have a function that loads all the files in the lisp directory that uses load-file with a full path.

Great thanks!

jamescherti commented 14 minutes ago

Excellent! Thank you for confirming that the bug has been fixed.

jamescherti commented 12 minutes ago

(Just a friendly reminder: Don't forget to disable debug mode by setting (setq compile-angel-debug nil) to improve compile-angel performance.)

artelse commented 5 minutes ago

Had disabled debug already, but thanks. Also moved load-path back after compile-angel and all works fine.