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

Emacs >= 29.1: "⛔ Warning (comp): evil-pkg.el:1:2: Warning: the function `define-package' is not known to be defined." #1915

Open
jf opened this issue Jun 18, 2024 · 4 comments

Comments

@jf
Copy link

jf commented Jun 18, 2024

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

;; 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?)

@axelf4
Copy link
Collaborator

axelf4 commented Jun 18, 2024

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.

@tomdl89
Copy link
Member

tomdl89 commented Jun 18, 2024

Thanks for pointing out the goto-line comp warning though - I've fixed that in master just now.

@jf
Copy link
Author

jf commented Jun 19, 2024

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.

thank you for the info. Does this mean evil-pkg.el should be removed from the github repo?

@tomdl89
Copy link
Member

tomdl89 commented Jun 20, 2024

I don't know. @axelf4 feel free to remove it if you see fit 👍

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

No branches or pull requests

3 participants