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

pet-20230423.2326/pet.elc failed to define function pet #22

Closed
skeezix opened this issue May 29, 2023 · 7 comments
Closed

pet-20230423.2326/pet.elc failed to define function pet #22

skeezix opened this issue May 29, 2023 · 7 comments

Comments

@skeezix
Copy link

skeezix commented May 29, 2023

Description
After adding pet (use-package pet :ensure t) I'm getting a tonne of this in Messages

File mode specification error: (error Autoloading file /Users/mit5893/.emacs.d/elpa/pet-20230423.2326/pet.elc failed to define function pet)

Expected behavior
... not to see an error :)

PET version
20230423 from melpa

Emacs version
30.0.50 (probably an alpha or beta build using homebrew on Mac)

FWIW:
bash-3.2$ grep defun pet.el
(defun pet-system-bin-dir ()
(defun pet-report-error (err)
(defun pet-project-root ()
(defun pet-find-file-from-project-root (file)
(defun pet-locate-dominating-file (file)
(defun pet-find-file-from-project-root-recursively (file)
(defun pet-find-file-from-project (file)
(defun pet-parse-json (str)
(defun pet-parse-config-file (file-path)
(defun pet-make-config-file-change-callback (cache-var parser)
(defun pet-watch-config-file (config-file cache-var parser)
(defun ,(intern path-accessor-name) ()
(defun ,(intern accessor-name) ()
(defun pet-use-pre-commit-p ()
(defun pet-use-conda-p ()
(defun pet-use-poetry-p ()
(defun pet-use-pyenv-p ()
(defun pet-use-pipenv-p ()
(defun pet-pre-commit-config-has-hook-p (id)
(defun pet-parse-pre-commit-db (db-file)
(defun pet-pre-commit-virtualenv-path (hook-id)
(defun pet-executable-find (executable)
(defun pet-virtualenv-root ()
(defun pet-flycheck-python-pylint-find-pylintrc ()
(defun pet-flycheck-checker-get-advice (fn checker property)
(defun pet-flycheck-toggle-local-vars ()
(defun pet-flycheck-setup ()
(defun pet-flycheck-teardown ()
(defun pet-buffer-local-vars-setup ()
(defun pet-buffer-local-vars-teardown ()
(defun pet-verify-setup ()
(defun pet-cleanup-watchers-and-caches ()

@wyuenho
Copy link
Owner

wyuenho commented May 29, 2023

I need a stack trace.

You can get it by putting (setq debug-on-error t) at the top of your init file.

@skeezix
Copy link
Author

skeezix commented May 29, 2023

Lets see if image attach works.. this is on start up with persp and desktop mode picking up existing state and loading up the previously opened files
image

@skeezix
Copy link
Author

skeezix commented May 29, 2023

I wonder if the issue was popping up due to the package being roped in as a dependancy (but also explicitly by me, later in the config.) I added a 'use-package pet' to near the top of the config and most of the Messages lines went away; still a couple in response to undo-tree trying to open a bunch of files.

Removed undo-tree for now, still seeing a couple:

Entities are now displayed as UTF8 characters
File mode specification error: (error Autoloading file /Users/mit5893/.emacs.d/elpa/pet-20230423.2326/pet.el failed to define function pet)
Entities are now displayed as UTF8 characters
File mode specification error: (error Autoloading file /Users/mit5893/.emacs.d/elpa/pet-20230423.2326/pet.el failed to define function pet)

I suppose the ultimate would be to set aside my config, and build up a new config bit by bit to see when the error pops up, but oooof.

image

@skeezix
Copy link
Author

skeezix commented May 29, 2023

;; emacs-pet python executable tracker to locate pythons better
(use-package pet
:ensure t
:hook (python-mode))

@wyuenho
Copy link
Owner

wyuenho commented May 30, 2023

Oh I see, I think the README has misled you. Try this:

(use-package pet
  :ensure t
  :hook (python-mode . pet-mode))

@wyuenho
Copy link
Owner

wyuenho commented May 30, 2023

I've update the README now, this should fix your issue.

@wyuenho wyuenho closed this as completed May 30, 2023
@skeezix
Copy link
Author

skeezix commented May 31, 2023

Yep, this did clear up the errors :) Good catch, thanks very much!

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

2 participants