copilot-emacs / copilot.el

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

On macOS: Wrong type argument: package-desc, nil on trying to install with quelpa #194

Closed aramirezreyes closed 8 months ago

aramirezreyes commented 8 months ago

Hi!

I am trying to get copilot.el to work. I have added this to my init file:

(require 'use-package)
(require 'quelpa-use-package)
(use-package copilot
  :quelpa (copilot :fetcher github
                   :repo "zerolfx/copilot.el"
                   :branch "main"
                   :files ("dist" "*.el")))

But I get the following:

 Warning (initialization): An error occurred while loading (init file):

Wrong type argument: package-desc, nil

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

Can I get any advice?

I am on emacs 29.1 and MacOS Ventura 13.6

aramirezreyes commented 8 months ago

Apparently there is some sort of conflict with the tar utility shipped by macOS. Per this discussion, the fix is installing gnu tar and linking it from the init file:

In my case, I installed via homebrew and my the relevant section on my init file is like this:

;; Copilot
(require 'use-package)
(require 'quelpa-use-package)
(setq-default quelpa-build-tar-executable "/opt/homebrew/bin/gtar")
(use-package copilot
  :quelpa (copilot :fetcher github
                   :repo "zerolfx/copilot.el"
                   :branch "main"
                   :files ("dist" "*.el")))