Skip to content

Latest commit (f8283e4) causes runtime exception: (wrong-type-argument package-desc nil) #261

@rnadler

Description

@rnadler

Emacs 29.2
node v19.4.0
Pin to commit 581cadd to resolve.

Debugger entered--Lisp error: (wrong-type-argument package-desc nil)
  signal(wrong-type-argument (package-desc nil))
  (or (progn (and (memq (type-of desc) cl-struct-package-desc-tags) t)) (signal 'wrong-type-argument (list 'package-desc desc)))
  (progn (or (progn (and (memq (type-of desc) cl-struct-package-desc-tags) t)) (signal 'wrong-type-argument (list 'package-desc desc))) (aref desc 2))
  (let* ((desc (package-get-descriptor 'jsonrpc)) (vlist (progn (or (progn (and (memq ... cl-struct-package-desc-tags) t)) (signal 'wrong-type-argument (list 'package-desc desc))) (aref desc 2))) (version (package-version-join vlist))) version)
  copilot--jsonrpc-version()
  (version< (copilot--jsonrpc-version) "1.0.23")
  (let ((node-version (string-to-number (s-chop-prefix "v" (s-trim (let (...) (unwind-protect ... ...)))))) (old-jsonrpc (version< (copilot--jsonrpc-version) "1.0.23"))) (cond ((< node-version 18) (user-error "Node 18+ is required but found %s" node-version)) (t (setq copilot--connection (make-instance 'jsonrpc-process-connection :name "copilot" (if old-jsonrpc :events-buffer-scrollback-size :events-buffer-config) (if old-jsonrpc copilot-log-max (list ':size copilot-log-max)) :notification-dispatcher #'copilot--handle-notification :process (make-process :name "copilot agent" :command (list copilot-node-executable (concat copilot--base-dir "/dist/agent.js")) :coding 'utf-8-emacs-unix :connection-type 'pipe :stderr (get-buffer-create "*copilot stderr*") :noquery t))) (message "Copilot agent started.") (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (jsonrpc-request copilot--connection 'initialize '(:capabilities (:workspace ...)))) (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (let ((buf (current-buffer))) (jsonrpc-async-request copilot--connection 'setEditorInfo (cons ':editorInfo (cons ... ...)) :success-fn #'(lambda ... ...)))))))
  (if (not (locate-file copilot-node-executable exec-path)) (user-error "Could not find node executable") (let ((node-version (string-to-number (s-chop-prefix "v" (s-trim (let ... ...))))) (old-jsonrpc (version< (copilot--jsonrpc-version) "1.0.23"))) (cond ((< node-version 18) (user-error "Node 18+ is required but found %s" node-version)) (t (setq copilot--connection (make-instance 'jsonrpc-process-connection :name "copilot" (if old-jsonrpc :events-buffer-scrollback-size :events-buffer-config) (if old-jsonrpc copilot-log-max (list ... copilot-log-max)) :notification-dispatcher #'copilot--handle-notification :process (make-process :name "copilot agent" :command (list copilot-node-executable ...) :coding 'utf-8-emacs-unix :connection-type 'pipe :stderr (get-buffer-create "*copilot stderr*") :noquery t))) (message "Copilot agent started.") (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (jsonrpc-request copilot--connection 'initialize '(:capabilities ...))) (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (let ((buf ...)) (jsonrpc-async-request copilot--connection 'setEditorInfo (cons ... ...) :success-fn #'...)))))))
  copilot--start-agent()
  (if (copilot--connection-alivep) nil (copilot--start-agent))
  (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (jsonrpc-notify copilot--connection 'textDocument/didClose (list :textDocument (list :uri (copilot--get-uri)))))
  (progn (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (jsonrpc-notify copilot--connection 'textDocument/didClose (list :textDocument (list :uri (copilot--get-uri))))) (setq copilot--opened-buffers (delete (current-buffer) copilot--opened-buffers)))
  (if (-contains-p copilot--opened-buffers (current-buffer)) (progn (progn (if (copilot--connection-alivep) nil (copilot--start-agent)) (jsonrpc-notify copilot--connection 'textDocument/didClose (list :textDocument (list :uri (copilot--get-uri))))) (setq copilot--opened-buffers (delete (current-buffer) copilot--opened-buffers))))
  copilot--on-doc-close()
  kill-buffer("packages.el")
  funcall-interactively(kill-buffer "packages.el")
  command-execute(kill-buffer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions