Emacs >= 29.1: "⛔ Warning (comp): evil-pkg.el:1:2: Warning: the function `define-package' is not known to be defined."
jf opened this issue · comments
Issue type
- Other
NOTE that this is, in a way, a bug report, but since it does not (at least not to me) result in any failure, I am classing it as "Other"
Environment
Emacs version: GNU Emacs 29.1 (build 1, aarch64-apple-darwin23.2.0, Carbon Version 170 AppKit 2487.3) of 2024-04-10
Operating System: macOS Sonoma
Evil version: Evil version 1.15.0
Evil installation type: straight.el
Graphical/Terminal: graphical
Tested in a make emacs session (see CONTRIBUTING.md): No
Reproduction steps
- set up Emacs with a basic straight.el setup as per https://github.com/radian-software/straight.el#getting-started, and install and activate evil:
;; init.el
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'evil)
(evil-mode)
Expected behavior
No warnings in *Warnings*
Actual behavior
I get a warning in *Warnings*:
⛔ Warning (comp): evil-pkg.el:1:2: Warning: the function `define-package' is not known to be defined."
Further notes
To be sure, there are actually more warnings than the one mentioned; I'm unsure as to where the fault lies with the other 2. Please feel free to reply re the other 2. The complete list:
⛔ Warning (comp): /Users/jf/.config/emacs/straight/build/evil/evil-types.el: Error: Native elisp load failed /Users/jf/.config/emacs/eln-cache/29_1-31adefd2/subr--trampoline-7365742d77696e646f772d627566666572_set_window_buffer_0.eln
⛔ Warning (comp): evil-pkg.el:1:2: Warning: the function `define-package' is not known to be defined.
⛔ Warning (comp): evil-states.el:166:23: Warning: `goto-line' is for interactive use only; use `forward-line' instead.
I imagine for the warning about define-package
, wrapping the call to define-package
in a version<
check would work (unless something else needs to be done in place of define-package
?)
evil-pkg.el
is not meant to be evaluated or compiled, package.el only reads it - I do not know why straight.el byte-compiles it for you. As the file gets regenerated by the ELPAs from the metadata in evil.el
anyway it really should just be removed.
Thanks for pointing out the goto-line
comp warning though - I've fixed that in master just now.
evil-pkg.el
is not meant to be evaluated or compiled, package.el only reads it - I do not know why straight.el byte-compiles it for you. As the file gets regenerated by the ELPAs from the metadata inevil.el
anyway it really should just be removed.
thank you for the info. Does this mean evil-pkg.el
should be removed from the github repo?
I don't know. @axelf4 feel free to remove it if you see fit 👍