copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.71k stars 122 forks source link

Spacemacs `An error occurred while installing copilot (error: (wrong-type-argument package-desc nil))` #303

Closed mattharrison closed 1 month ago

mattharrison commented 1 month ago

Installing in spacemacs failed. Here is my .spacemacs sections:

  dotspacemacs-additional-packages '(
                                      (copilot :location (recipe
                                                          :fetcher github
                                                          :repo "copilot-emacs/copilot.el"
                                                          :files ("*.el")))
                                      )

;;...

(defun dotspacemacs/user-config ()
  "Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."

  (with-eval-after-load 'company
    ;; disable inline previews
    (delq 'company-preview-if-just-one-frontend company-frontends))

  (with-eval-after-load 'copilot
    (define-key copilot-completion-map (kbd "<tab>") 'copilot-accept-completion)
    (define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion)
    (define-key copilot-completion-map (kbd "C-TAB") 'copilot-accept-completion-by-word)
    (define-key copilot-completion-map (kbd "C-<tab>") 'copilot-accept-completion-by-word))

  (add-hook 'prog-mode-hook 'copilot-mode)
)

I got the following error in *Messages*:

Cloning https://github.com/copilot-emacs/copilot.el.git to /Users/matt/.emacs.d/.cache/quelpa/build/copilot/
Note: copilot :files spec is equivalent to the default.
/Users/matt/.emacs.d/.cache/quelpa/build/copilot/copilot-balancer.el -> /var/folders/qn/r8_0pgj1645dn1w69vqls6cw0000gn/T/copilotcF1A6o/copilot-20240501.81412/copilot-balancer.el
/Users/matt/.emacs.d/.cache/quelpa/build/copilot/copilot.el -> /var/folders/qn/r8_0pgj1645dn1w69vqls6cw0000gn/T/copilotcF1A6o/copilot-20240501.81412/copilot.el
Wrote /Users/matt/.emacs.d/.cache/quelpa/packages/copilot-readme.txt
Parsing tar file...done
Error getting PACKAGE-DESC: (wrong-type-argument arrayp nil)
(Spacemacs) Error: 
An error occurred while installing copilot (error: (wrong-type-argument package-desc nil))
mattharrison commented 1 month ago

I updated my spacemacs (cd ~/.emacs; git pull) and the issue appeared to resolve

mattharrison commented 1 month ago

Closing