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

Error: cond: Symbol’s value as variable is void: method #770

Closed
stapelberg opened this issue Apr 16, 2019 · 2 comments
Closed

Error: cond: Symbol’s value as variable is void: method #770

stapelberg opened this issue Apr 16, 2019 · 2 comments

Comments

@stapelberg
Copy link
Contributor

Describe the bug
lsp-mode prints an error message:

LSP :: Connected to [gopls:21956 status:starting].
error in process filter: cond: Symbol’s value as variable is void: method

…and in general does not seem to work. E.g. running M-x lsp-find-definition results in Lisp error: (void-variable check-command)

To Reproduce

  1. Install lsp-mode-20190415.853
  2. Install https:/golang/go/wiki/gopls: go get -u golang.org/x/tools/cmd/gopls
  3. Configure lsp-mode to use gopls as per https:/golang/go/wiki/gopls
  4. Enable LSP mode while working on a .go file.

OS
Debian testing

Error callstack

*lsp-log* buffer contents:

<<<< gopls:24334
{
  "jsonrpc": "2.0",
  "method": "workspace/configuration",
  "params": {
    "items": [
      {
        "scopeUri": "file:///home/michael/go/src/github.com/rtr7/router7/",
        "section": "gopls"
      }
    ]
  },
  "id": 1
}

lisp backtrace:

  (equal method '"client/registerCapability")
  (cond ((equal method '"client/registerCapability") (seq-do (function (lambda (reg) (lsp--server-register-capability reg))) (gethash "registrations" params)) empty-response) ((equal method '"window/showMessageRequest") (let ((choice (lsp--window-log-message-request params))) (lsp--make-response request (list ':title choice)))) ((equal method '"client/unregisterCapability") (seq-do (function (lambda (unreg) (lsp--server-unregister-capability unreg))) (gethash "unregisterations" params)) empty-response) ((equal method '"workspace/applyEdit") (lsp--apply-workspace-edit (gethash "edit" params)) empty-response) ((equal method '"workspace/configuration") (lsp--make-response request (lsp--build-workspace-configuration-response params))) (t (let ((other method)) (let ((handler (gethash other (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 7)) nil))) (if handler (lsp--make-response request (funcall handler workspace params)) (lsp-warn "Unknown request method: %s" other) empty-response)))))
  (let* ((client (progn (or (and (memq (type-of workspace) cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list 'lsp--workspace workspace))) (aref workspace 5))) (process (progn (or (and (memq (type-of workspace) cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list 'lsp--workspace workspace))) (aref workspace 7))) (empty-response (lsp--make-response request nil)) (response (cond ((equal method '"client/registerCapability") (seq-do (function (lambda (reg) (lsp--server-register-capability reg))) (gethash "registrations" params)) empty-response) ((equal method '"window/showMessageRequest") (let ((choice (lsp--window-log-message-request params))) (lsp--make-response request (list ':title choice)))) ((equal method '"client/unregisterCapability") (seq-do (function (lambda (unreg) (lsp--server-unregister-capability unreg))) (gethash "unregisterations" params)) empty-response) ((equal method '"workspace/applyEdit") (lsp--apply-workspace-edit (gethash "edit" params)) empty-response) ((equal method '"workspace/configuration") (lsp--make-response request (lsp--build-workspace-configuration-response params))) (t (let ((other method)) (let ((handler (gethash other (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 7)) nil))) (if handler (lsp--make-response request (funcall handler workspace params)) (lsp-warn "Unknown request method: %s" other) empty-response))))))) (lsp--send-no-wait (lsp--make-message response) process))
  lsp--on-request(#s(lsp--workspace :parser #s(lsp--parser :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "" :workspace #1) :server-capabilities #<hash-table equal 11/65 0x152b941> :registered-server-capabilities nil :root "~/go/src/github.com/rtr7/router7/" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((command . "gopls") cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) (filter sentinel name) (let ((final-command (lsp-resolve-final-function command)) (process-name (generate-new-buffer-name name))) (let ((proc (make-process :name process-name :connection-type 'pipe :buffer (format "*%s*" process-name) :coding 'no-conversion :command final-command :filter filter :sentinel sentinel :stderr (format "*%s::stderr*" process-name) :noquery t))) (set-process-query-on-exit-flag proc nil) (cons proc proc)))) :test\? (closure ((command . "gopls") cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x138c099> :request-handlers #<hash-table equal 0/65 0x138c0b9> :response-handlers #<hash-table eql 0/65 0x12d63c9> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x12d63e9> :action-handlers #<hash-table equal 0/65 0x12d77c9> :major-modes (go-mode) :activation-fn nil :priority 0 :server-id gopls :multi-root nil :initialization-options lsp-clients-go--make-init-options :library-folders-fn #f(compiled-function (workspace) #<bytecode 0x12bdaf1>) :before-file-open-fn nil :initialized-fn nil :remote? nil :message-trace nil) :host-root nil :proc #<process gopls> :cmd-proc #<process gopls> :buffers (#<buffer dhcp6.go>) :highlight-overlays #<hash-table eq 0/65 0x155196d> :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x155198d> :watches #<hash-table equal 0/65 0x141ab51> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x141ab71>) #<hash-table equal 4/65 0x12540dd>)
  (cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-48-- (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (method (prog1 (car (cdr --dash-source-48--)) (setq --dash-source-48-- (nthcdr 2 --dash-source-48--)))) (start-time (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (before-send (car --dash-source-48--))) (if lsp-trace (progn (let* ((v (lsp--make-log-entry method id nil 'incoming-resp data (/ (nth 2 (time-since before-send)) 1000)))) (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (let* ((v client)) (aset v 22 (cons v (aref v 22)))))))) (if callback (progn (funcall callback (gethash "result" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-50-- (cdr (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))))) (callback (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (method (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (start-time (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (before-send (car --dash-source-50--))) (if callback (progn (funcall callback (gethash "error" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification lsp--cur-workspace json-data) (log--notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request lsp--cur-workspace json-data)) (t nil))
  (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-48-- (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (method (prog1 (car (cdr --dash-source-48--)) (setq --dash-source-48-- (nthcdr 2 --dash-source-48--)))) (start-time (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (before-send (car --dash-source-48--))) (if lsp-trace (progn (let* ((v (lsp--make-log-entry method id nil 'incoming-resp data (/ (nth 2 (time-since before-send)) 1000)))) (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (let* ((v client)) (aset v 22 (cons v (aref v 22)))))))) (if callback (progn (funcall callback (gethash "result" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-50-- (cdr (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))))) (callback (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (method (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (start-time (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (before-send (car --dash-source-50--))) (if callback (progn (funcall callback (gethash "error" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification lsp--cur-workspace json-data) (log--notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request lsp--cur-workspace json-data)) (t nil)))
  (let* ((client (progn (or (and (memq (type-of lsp--cur-workspace) cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list 'lsp--workspace lsp--cur-workspace))) (aref lsp--cur-workspace 5))) (received-time (current-time)) (server-id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15))) (json-data (lsp--read-json msg)) (after-parsed-time (current-time)) (id (let ((it (gethash "id" json-data))) (if it (progn (if (stringp it) (string-to-number it) it))))) (data (gethash "result" json-data)) after-processed-time) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-48-- (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (method (prog1 (car (cdr --dash-source-48--)) (setq --dash-source-48-- (nthcdr 2 --dash-source-48--)))) (start-time (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (before-send (car --dash-source-48--))) (if lsp-trace (progn (let* ((v (lsp--make-log-entry method id nil 'incoming-resp data (/ (nth 2 (time-since before-send)) 1000)))) (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (let* ((v client)) (aset v 22 (cons v (aref v 22)))))))) (if callback (progn (funcall callback (gethash "result" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-50-- (cdr (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))))) (callback (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (method (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (start-time (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (before-send (car --dash-source-50--))) (if callback (progn (funcall callback (gethash "error" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification lsp--cur-workspace json-data) (log--notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request lsp--cur-workspace json-data)) (t nil))))
  (let ((lsp--cur-workspace (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7)))) (let* ((client (progn (or (and (memq (type-of lsp--cur-workspace) cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list 'lsp--workspace lsp--cur-workspace))) (aref lsp--cur-workspace 5))) (received-time (current-time)) (server-id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15))) (json-data (lsp--read-json msg)) (after-parsed-time (current-time)) (id (let ((it (gethash "id" json-data))) (if it (progn (if (stringp it) (string-to-number it) it))))) (data (gethash "result" json-data)) after-processed-time) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-48-- (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (method (prog1 (car (cdr --dash-source-48--)) (setq --dash-source-48-- (nthcdr 2 --dash-source-48--)))) (start-time (car-safe (prog1 --dash-source-48-- (setq --dash-source-48-- (cdr --dash-source-48--))))) (before-send (car --dash-source-48--))) (if lsp-trace (progn (let* ((v (lsp--make-log-entry method id nil 'incoming-resp data (/ (nth 2 (time-since before-send)) 1000)))) (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (let* ((v client)) (aset v 22 (cons v (aref v 22)))))))) (if callback (progn (funcall callback (gethash "result" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-50-- (cdr (gethash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))))) (callback (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (method (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (start-time (car-safe (prog1 --dash-source-50-- (setq --dash-source-50-- (cdr --dash-source-50--))))) (before-send (car --dash-source-50--))) (if callback (progn (funcall callback (gethash "error" json-data)) (remhash id (progn (or (and (memq (type-of client) cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (setq after-processed-time (current-time)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time after-processed-time))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification lsp--cur-workspace json-data) (log--notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request lsp--cur-workspace json-data)) (t nil)))))
  lsp--parser-on-message(#s(lsp--parser :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "" :workspace #s(lsp--workspace :parser #1 :server-capabilities #<hash-table equal 11/65 0x152b941> :registered-server-capabilities nil :root "~/go/src/github.com/rtr7/router7/" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((command . "gopls") cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) (filter sentinel name) (let ((final-command (lsp-resolve-final-function command)) (process-name (generate-new-buffer-name name))) (let ((proc (make-process :name process-name :connection-type 'pipe :buffer (format "*%s*" process-name) :coding 'no-conversion :command final-command :filter filter :sentinel sentinel :stderr (format "*%s::stderr*" process-name) :noquery t))) (set-process-query-on-exit-flag proc nil) (cons proc proc)))) :test\? (closure ((command . "gopls") cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x138c099> :request-handlers #<hash-table equal 0/65 0x138c0b9> :response-handlers #<hash-table eql 0/65 0x12d63c9> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x12d63e9> :action-handlers #<hash-table equal 0/65 0x12d77c9> :major-modes (go-mode) :activation-fn nil :priority 0 :server-id gopls :multi-root nil :initialization-options lsp-clients-go--make-init-options :library-folders-fn #f(compiled-function (workspace) #<bytecode 0x12bdaf1>) :before-file-open-fn nil :initialized-fn nil :remote? nil :message-trace nil) :host-root nil :proc #<process gopls> :cmd-proc #<process gopls> :buffers (#<buffer dhcp6.go>) :highlight-overlays #<hash-table eq 0/65 0x155196d> :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x155198d> :watches #<hash-table equal 0/65 0x141ab51> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x141ab71>)) "{\"jsonrpc\":\"2.0\",\"method\":\"workspace/configuration\",\"params\":{\"items\":[{\"scopeUri\":\"file:///home/michael/go/src/github.com/rtr7/router7/\",\"section\":\"gopls\"}]},\"id\":1}")
  (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (progn (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--))))))
  (if messages (progn (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
  (let ((messages (condition-case err (lsp--parser-read p output) (error (let ((chunk (concat (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 6)) output))) (lsp--parser-reset p) (ignore (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwith message %s" chunk err))))))) (if messages (progn (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--))))))))
  (progn (let ((messages (condition-case err (lsp--parser-read p output) (error (let ((chunk (concat (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 6)) output))) (lsp--parser-reset p) (ignore (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwith message %s" chunk err))))))) (if messages (progn (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--)))))))))
  (if (let* ((--cl-var-- ignore-regexps) (r nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq r (car --cl-var--)) (if (string-match r output) (setq --cl-var-- nil --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-var-- (progn t) --cl-var--)) (progn (let ((messages (condition-case err (lsp--parser-read p output) (error (let ((chunk (concat (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 6)) output))) (lsp--parser-reset p) (ignore (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwith message %s" chunk err))))))) (if messages (progn (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--))))))))))
  (closure ((ignore-regexps) (p . #s(lsp--parser :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "" :workspace #s(lsp--workspace :parser #3 :server-capabilities #<hash-table equal 11/65 0x152b941> :registered-server-capabilities nil :root "~/go/src/github.com/rtr7/router7/" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((command . "gopls") cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) (filter sentinel name) (let ((final-command (lsp-resolve-final-function command)) (process-name (generate-new-buffer-name name))) (let ((proc (make-process :name process-name :connection-type 'pipe :buffer (format "*%s*" process-name) :coding 'no-conversion :command final-command :filter filter :sentinel sentinel :stderr (format "*%s::stderr*" process-name) :noquery t))) (set-process-query-on-exit-flag proc nil) (cons proc proc)))) :test\? (closure ((command . "gopls") cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x138c099> :request-handlers #<hash-table equal 0/65 0x138c0b9> :response-handlers #<hash-table eql 0/65 0x12d63c9> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x12d63e9> :action-handlers #<hash-table equal 0/65 0x12d77c9> :major-modes (go-mode) :activation-fn nil :priority 0 :server-id gopls :multi-root nil :initialization-options lsp-clients-go--make-init-options :library-folders-fn #f(compiled-function (workspace) #<bytecode 0x12bdaf1>) :before-file-open-fn nil :initialized-fn nil :remote? nil :message-trace nil) :host-root nil :proc #<process gopls> :cmd-proc #<process gopls> :buffers (#<buffer dhcp6.go>) :highlight-overlays #<hash-table eq 0/65 0x155196d> :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x155198d> :watches #<hash-table equal 0/65 0x141ab51> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x141ab71>))) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags cl-struct-lsp--folding-range-tags cl-struct-lsp-diagnostic-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags cl-struct-lsp--parser-tags lsp--log-lines t) (_proc output) (if (let* ((--cl-var-- ignore-regexps) (r nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq r (car --cl-var--)) (if (string-match r output) (setq --cl-var-- nil --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-var-- (progn t) --cl-var--)) (progn (let ((messages (condition-case err (lsp--parser-read p output) (error (let ((chunk (concat (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 6)) output))) (lsp--parser-reset p) (ignore (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwith message %s" chunk err))))))) (if messages (progn (let ((--dolist-tail-- messages)) (while --dolist-tail-- (let ((m (car --dolist-tail--))) (if lsp-print-io (progn (lsp-log "<<<< %s\n%s" (lsp--workspace-print (progn (or (and (memq (type-of p) cl-struct-lsp--parser-tags) t) (signal 'wrong-type-argument (list 'lsp--parser p))) (aref p 7))) (lsp--json-pretty-print m)))) (lsp--parser-on-message p m) (setq --dolist-tail-- (cdr --dolist-tail--)))))))))))(#<process gopls> "Content-Length: 166\015\n\015\n{\"jsonrpc\":\"2.0\",\"method\":\"workspace/configuration\",\"params\":{\"items\":[{\"scopeUri\":\"file:///home/michael/go/src/github.com/rtr7/router7/\",\"section\":\"gopls\"}]},\"id\":1}")
@stapelberg
Copy link
Contributor Author

This was solved by updating the dash package to version 20190413.1058.

I do wonder why lsp-mode lists dash 2.14 as a requirement, though, and I’m using 20190413.1058, not 2.14.

Am I missing something about how emacs package version numbers work, or could lsp-mode’s requirements be improved to pull in this dependency automatically? This was a fresh installation of lsp-mode.

@yyoncho
Copy link
Member

yyoncho commented Apr 16, 2019

see magnars/dash.el#277 (comment)

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