lsp-ivy-workspace-symbol error: "Error processing message (wrong-number-of-arguments (1 . 1) 3)."
ville-h opened this issue · comments
Entirely possible this is not lsp-mode's fault, but as I've no real understanding which of the packages is responsible for the recent break in functionality I'll start here. Feel free to point me towards the correct package.
Describe the bug
Invoking lsp-ivy-workspace-symbol
resuls in: Error processing message (wrong-number-of-arguments (1 . 1) 3).
and debug output.
To Reproduce
- edit
lsp-start-plain.el
line 44 to contain:(pkg-list '(ivy yasnippet lsp-mode lsp-ivy company)))
- add
(setq lsp-print-io t)
intolsp-start-plain.el
- start
emacs -q -l lsp-start-plain.el
- create
main.c
with:int main() { return 0; }
- invoke
M-x
and thenlsp-ivy-workspace-symbol
Expected behavior
Emacs should not display an error message or debug output when the prompt in the mininbuffer comes up.
Which Language Server did you use
lsp-clangd
OS
linux
Error callstack
Backtrace:
Debugger entered--Lisp error: (wrong-number-of-arguments (((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or (car parts) "")) (filter-regexps? (mapcar #'regexp-quote (cdr parts)))) (if query (progn (if (string-equal prev-query query) (funcall update-candidates unfiltered-candidates filter-regexps?) (let (...) (lsp-request-async "workspace/symbol" ... ... :mode ... :cancel-token :workspace-symbol))))) (setq prev-query query)) (or filtered-candidates 0)) 3)
(closure ((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (all-candidates filter-regexps?) (setq filtered-candidates (let ... ... ...)) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_tes..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or ... "")) (filter-regexps? (mapcar ... ...))) (if query (progn (if ... ... ...))) (setq prev-query query)) (or filtered-candidates 0))("" nil metadata)
completion-metadata("" (closure ((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or (car parts) "")) (filter-regexps? (mapcar #'regexp-quote (cdr parts)))) (if query (progn (if (string-equal prev-query query) (funcall update-candidates unfiltered-candidates filter-regexps?) (let (...) (lsp-request-async "workspace/symbol" ... ... :mode ... :cancel-token :workspace-symbol))))) (setq prev-query query)) (or filtered-candidates 0)) nil)
(let ((ivy--minibuffer-metadata (completion-metadata "" minibuffer-completion-table minibuffer-completion-predicate))) (ivy--insert-minibuffer (ivy--format (setq ivy--all-candidates cands))))
ivy-update-candidates(nil)
(closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let ((list all-candidates) (i 0) it it-index) (ignore it it-index) (while list (setq it (car-safe ...) it-index i i (1+ i)) (let (...) (if mapped ...)))) (nreverse result))) (ivy-update-candidates filtered-candidates))(nil nil)
funcall((closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let ((list all-candidates) (i 0) it it-index) (ignore it it-index) (while list (setq it (car-safe ...) it-index i i (1+ i)) (let (...) (if mapped ...)))) (nreverse result))) (ivy-update-candidates filtered-candidates)) nil nil)
(closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (all-candidates filter-regexps?) (setq filtered-candidates (let ... ... ...)) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_tes...") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_tes..." :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?))(nil)
funcall((closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) nil)
(progn (funcall callback (if no-merge results (lsp--merge-results (-map #'cl-rest results) method))))
(if (and (not (eq (length errors) (length workspaces))) (eq (+ (length errors) (length results)) (length workspaces))) (progn (funcall callback (if no-merge results (lsp--merge-results (-map #'cl-rest results) method)))))
(closure ((errors) (results (... . ...)) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_..." :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) (no-merge) (method . "workspace/symbol") (callback closure (... ... ... ... ... ... ... ... ... ... ... ... t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (result) (let* ((v ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...))))([])
funcall((closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>) . [])) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) (no-merge) (method . "workspace/symbol") (callback closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ... ... ... ...) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (result) (let* ((v (cons lsp--cur-workspace result))) (if (eq result :error) (setq errors (cons v errors)) (setq results (cons v results)))) (if (and (not (eq ... ...)) (eq (+ ... ...) (length workspaces))) (progn (funcall callback (if no-merge results ...))))) [])
(closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (result) (lsp--request-cleanup-hooks id) (funcall callback result))([])
funcall((closure ((callback closure ((errors) (results ...) (workspaces ...) (no-merge) (method . "workspace/symbol") (callback closure ... ... ... ...) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (result) (let* (...) (if ... ... ...)) (if (and ... ...) (progn ...))) (callback closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ... ... ... ...) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) (cleanup-hooks closure ((buf . #) (hooks) (id . 10) (method . "workspace/symbol") (start-time 24569 27682 119319 598000) (target-workspaces ...) (cancel-token . :workspace-symbol) (no-merge) (cancel-callback) (error-callback) (mode . detached) (callback closure ... ... ... ...) (body :jsonrpc "2.0" :method "workspace/symbol" :params #<hash-table equal 1/65 0x1571e3c65ce5> :id 10) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) nil (mapc #'... hooks) (remhash cancel-token lsp--cancelable-requests)) (buf . #) (hooks) (id . 10) (method . "workspace/symbol") (start-time 24569 27682 119319 598000) (target-workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) (cancel-token . :workspace-symbol) (no-merge) (cancel-callback) (error-callback) (mode . detached) (callback closure ((filter-regexps?) (query . "") (parts) (user-input . "") (update-candidates closure ... ... ... ...) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces ...) t) (result) (setq unfiltered-candidates result) (funcall update-candidates unfiltered-candidates filter-regexps?)) (body :jsonrpc "2.0" :method "workspace/symbol" :params #<hash-table equal 1/65 0x1571e3c65ce5> :id 10) cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) [])
(progn (funcall callback (lsp:json-response-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))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))
(if callback (progn (funcall callback (lsp:json-response-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))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time))))
(let* ((--dash-source-601-- (gethash id (progn (or (and (memq ... cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list ... client))) (aref client 8)))) (callback (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- (cdr --dash-source-601--))))) (method (prog1 (car (cdr --dash-source-601--)) (setq --dash-source-601-- (nthcdr 2 --dash-source-601--)))) (start-time (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- (cdr --dash-source-601--))))) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ (nth 2 (time-since before-send)) 1000)) workspace))) (if callback (progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn (or (and (memq ... cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list ... client))) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))
(cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-601-- (gethash id (progn (or ... ...) (aref client 8)))) (callback (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- ...)))) (method (prog1 (car (cdr --dash-source-601--)) (setq --dash-source-601-- (nthcdr 2 --dash-source-601--)))) (start-time (car-safe (prog1 --dash-source-601-- (setq --dash-source-601-- ...)))) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ ... 1000)) workspace))) (if callback (progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn (or ... ...) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-603-- (cdr (gethash id (progn ... ...)))) (callback (car-safe (prog1 --dash-source-603-- (setq --dash-source-603-- ...)))) (method (car-safe (prog1 --dash-source-603-- (setq --dash-source-603-- ...)))) (start-time (car-safe (prog1 --dash-source-603-- (setq --dash-source-603-- ...)))) (before-send (car --dash-source-603--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data 'incoming-resp (/ ... 1000)) workspace))) (if callback (progn (funcall callback (lsp:json-response-error-error json-data)) (remhash id (progn (or ... ...) (aref client 8))) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request 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-601-- (gethash id (progn ... ...))) (callback (car-safe (prog1 --dash-source-601-- ...))) (method (prog1 (car ...) (setq --dash-source-601-- ...))) (start-time (car-safe (prog1 --dash-source-601-- ...))) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data ... ...) workspace))) (if callback (progn (funcall callback (lsp:json-response-result json-data)) (remhash id (progn ... ...)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-603-- (cdr (gethash id ...))) (callback (car-safe (prog1 --dash-source-603-- ...))) (method (car-safe (prog1 --dash-source-603-- ...))) (start-time (car-safe (prog1 --dash-source-603-- ...))) (before-send (car --dash-source-603--))) (if lsp-print-io (progn (lsp--log-entry-new (lsp--make-log-entry method id data ... ...) workspace))) (if callback (progn (funcall callback (lsp:json-response-error-error json-data)) (remhash id (progn ... ...)) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time (current-time)))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil)))
(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))) (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))) (after-parsed-time (current-time)) (id (let ((it (lsp:json-response-id json-data))) (if it (progn (if (stringp it) (string-to-number it) it))))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-601-- (gethash id ...)) (callback (car-safe ...)) (method (prog1 ... ...)) (start-time (car-safe ...)) (before-send (car --dash-source-601--))) (if lsp-print-io (progn (lsp--log-entry-new ... workspace))) (if callback (progn (funcall callback ...) (remhash id ...) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time ...))))) ((eq val 'response-error) (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-603-- (cdr ...)) (callback (car-safe ...)) (method (car-safe ...)) (start-time (car-safe ...)) (before-send (car --dash-source-603--))) (if lsp-print-io (progn (lsp--log-entry-new ... workspace))) (if callback (progn (funcall callback ...) (remhash id ...) (lsp--log-request-time server-id method id start-time before-send received-time after-parsed-time ...))))) ((eq val 'notification) (let ((before-notification (current-time))) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil))))
(let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (and (memq ... cl-struct-lsp--workspace-tags) t) (signal 'wrong-type-argument (list ... workspace))) (aref workspace 5))) (received-time (current-time)) (server-id (progn (or (and (memq ... cl-struct-lsp--client-tags) t) (signal 'wrong-type-argument (list ... client))) (aref client 15))) (after-parsed-time (current-time)) (id (let ((it (lsp:json-response-id json-data))) (if it (progn (if ... ... it))))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-601-- ...) (callback ...) (method ...) (start-time ...) (before-send ...)) (if lsp-print-io (progn ...)) (if callback (progn ... ... ...)))) ((eq val 'response-error) (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-603-- ...) (callback ...) (method ...) (start-time ...) (before-send ...)) (if lsp-print-io (progn ...)) (if callback (progn ... ... ...)))) ((eq val 'notification) (let ((before-notification ...)) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification (current-time)))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil)))))
(condition-case err (let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (and ... t) (signal ... ...)) (aref workspace 5))) (received-time (current-time)) (server-id (progn (or (and ... t) (signal ... ...)) (aref client 15))) (after-parsed-time (current-time)) (id (let ((it ...)) (if it (progn ...)))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (progn (or id ...) nil) (let* (... ... ... ... ...) (if lsp-print-io ...) (if callback ...))) ((eq val 'response-error) (progn (or id ...) nil) (let* (... ... ... ... ...) (if lsp-print-io ...) (if callback ...))) ((eq val 'notification) (let (...) (lsp--on-notification workspace json-data) (lsp--log-notification-performance server-id json-data received-time after-parsed-time before-notification ...))) ((eq val 'request) (lsp--on-request workspace json-data)) (t nil))))) ((debug error) (message "Error processing message %S." err) nil))
lsp--parser-on-message(#<hash-table equal 3/3 0x1571e3c4d405> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command . lsp-clients--clangd-command) company-mode cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (filter sentinel name environment-fn) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc)))) :test? (closure ((test-command) (command . lsp-clients--clangd-command) company-mode cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>))
(let ((lsp-parsed-message (decode-coding-string (apply #'concat (nreverse (prog1 body (progn ... ... ... ...)))) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists 'plist 'hash-table) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." (concat leftovers input) err))) workspace))
(progn (let ((lsp-parsed-message (decode-coding-string (apply #'concat (nreverse (prog1 body ...))) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists 'plist 'hash-table) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." (concat leftovers input) err))) workspace)))
(if (>= chunk-length left-to-receive) (progn (let ((lsp-parsed-message (decode-coding-string (apply #'concat (nreverse ...)) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists 'plist 'hash-table) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." (concat leftovers input) err))) workspace))))
(let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 (substring chunk 0 left-to-receive) (setq chunk (substring chunk left-to-receive))) (prog1 chunk (setq chunk "")))) (body-bytes (string-bytes this-body))) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn (let ((lsp-parsed-message (decode-coding-string (apply ... ...) 'utf-8))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type (if lsp-use-plists ... ...) :null-object nil :false-object nil) (error (lsp-warn "Failed to parse the following chunk:\n'''\n%s\n'''\nwi..." ... err))) workspace)))))
(if (not body-length) (let* ((body-sep-pos (and t (string-match-p "\15\n\15\n" chunk)))) (if body-sep-pos (progn (setq body-length (lsp--get-body-length (mapcar #'lsp--parse-header (split-string ... "\15\n")))) (setq body-received 0) (setq leftovers nil) (setq chunk (substring chunk (+ body-sep-pos 4)))) (progn (setq leftovers chunk) (setq chunk "")))) (let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 (substring chunk 0 left-to-receive) (setq chunk (substring chunk left-to-receive))) (prog1 chunk (setq chunk "")))) (body-bytes (string-bytes this-body))) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn (let ((lsp-parsed-message (decode-coding-string ... ...))) (lsp--parser-on-message (condition-case err (json-parse-string lsp-parsed-message :object-type ... :null-object nil :false-object nil) (error ...)) workspace))))))
(while (not (equal chunk "")) (if (not body-length) (let* ((body-sep-pos (and t (string-match-p "\15\n\15\n" chunk)))) (if body-sep-pos (progn (setq body-length (lsp--get-body-length (mapcar ... ...))) (setq body-received 0) (setq leftovers nil) (setq chunk (substring chunk (+ body-sep-pos 4)))) (progn (setq leftovers chunk) (setq chunk "")))) (let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 (substring chunk 0 left-to-receive) (setq chunk ...)) (prog1 chunk (setq chunk "")))) (body-bytes (string-bytes this-body))) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn (let ((lsp-parsed-message ...)) (lsp--parser-on-message (condition-case err ... ...) workspace)))))))
(closure ((chunk . "") (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect ... :test? ...) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) company-mode cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (_proc input) (setq chunk (concat leftovers (encode-coding-string input 'utf-8 'nocopy))) (while (not (equal chunk "")) (if (not body-length) (let* ((body-sep-pos ...)) (if body-sep-pos (progn ... ... ... ...) (progn ... ...))) (let* ((chunk-length ...) (left-to-receive ...) (this-body ...) (body-bytes ...)) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn ...))))))(# "Content-Length: 37\15\n\15\n{"id":10,"jsonrpc":"2.0","re...")
read-from-minibuffer("Workspace symbol: " nil (keymap keymap (36 . ivy-magic-read-file-env) (3 keymap (19 . ivy-rotate-sort) (1 . ivy-toggle-ignore) (15 . ivy-occur)) (33554464 . ivy-restrict-to-matches) (15 . hydra-ivy/body) (22 . ivy-scroll-up-command) (prior . ivy-scroll-down-command) (next . ivy-scroll-up-command) (7 . minibuffer-keyboard-quit) (right . ivy-forward-char) (32 . self-insert-command) (18 . ivy-reverse-i-search) (remap keymap (describe-mode . ivy-help) (kill-ring-save . ivy-kill-ring-save) (kill-whole-line . ivy-kill-whole-line) (kill-line . ivy-kill-line) (scroll-down-command . ivy-scroll-down-command) (scroll-up-command . ivy-scroll-up-command) (end-of-buffer . ivy-end-of-buffer) (beginning-of-buffer . ivy-beginning-of-buffer) (kill-word . ivy-kill-word) (forward-char . ivy-forward-char) (delete-char . ivy-delete-char) (backward-kill-word . ivy-backward-kill-word) (backward-delete-char-untabify . ivy-backward-delete-char) (delete-backward-char . ivy-backward-delete-char) (previous-line . ivy-previous-line) (next-line . ivy-next-line)) (9 . ivy-partial-or-done) (10 . ivy-alt-done) (27 keymap (1 . ivy-read-action) (15 . ivy-dispatching-call) (111 . ivy-dispatching-done) (25 . ivy-insert-current-full) (105 . ivy-insert-current) (106 . ivy-yank-word) (114 . ivy-toggle-regexp-quote) (97 . ivy-toggle-marks) (16 . ivy-previous-line-and-call) (14 . ivy-next-line-and-call) (118 . ivy-scroll-down-command) (112 . ivy-previous-history-element) (110 . ivy-next-history-element) (10 . ivy-immediate-done) (13 . ivy-call)) (mouse-3 . ivy-mouse-dispatching-done) (mouse-1 . ivy-mouse-done) (down-mouse-1 . ignore) (13 . ivy-done)) nil ivy-history)
(condition-case err (read-from-minibuffer prompt (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '(error "Selecting deleted buffer")) nil (signal (car err) (cdr err)))))
(if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (let* ((v ivy-last)) (aset v 23 (car ivy--all-candidates)))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '(error "Selecting deleted buffer")) nil (signal (car err) (cdr err))))))
(let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and (memq (type-of ivy-last) cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list 'ivy-state ivy-last))) (let* ((v ivy-last)) (aset v 23 (car ivy--all-candidates)))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '(error "Selecting deleted buffer")) nil (signal (car err) (cdr err)))))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))
(progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (let* ((v ivy-last)) (aset v 23 (car ivy--all-candidates)))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or (and ... t) (signal ... ...)) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err '...) nil (signal (car err) (cdr err)))))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist)))))
(unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or (and ... t) (signal ... ...)) (let* (...) (aset v 23 ...))) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn (or ... ...) (aref ivy-last 5)) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if (equal err ...) nil (signal ... ...))))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))) (remove-hook 'minibuffer-setup-hook setup-hook))
(let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history 'ivy-history)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if (display-graphic-p) nil 'grow-only))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null (cdr ivy--all-candidates))) (progn (progn (or ... ...) (let* ... ...)) (setq ivy-exit 'done)) (condition-case err (read-from-minibuffer prompt (progn ... ...) (make-composed-keymap keymap ivy-minibuffer-map) nil hist) (error (if ... nil ...)))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))) (remove-hook 'minibuffer-setup-hook setup-hook)))
(unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist (or history ...)) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height (ivy--height caller)) (resize-mini-windows (if ... nil ...))) (if (and ivy-auto-select-single-candidate ivy--all-candidates (null ...)) (progn (progn ... ...) (setq ivy-exit ...)) (condition-case err (read-from-minibuffer prompt ... ... nil hist) (error ...))) (if (eq ivy-exit 'done) (progn (ivy--update-history hist))))) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or (plist-get extra-props :session) (if (or (minibufferp) (null ...) (eq ... ...)) nil caller)))) (if session (progn (progn (or (and (memq ... cl-struct-ivy-state-tags) t) (signal 'wrong-type-argument (list ... ivy-last))) (let* ((v ivy-last)) (aset v 27 (plist-put extra-props :ivy-data ...)))) (ivy--alist-set 'ivy--sessions session ivy-last)))) (ivy--cleanup))
(let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last (not (window-minibuffer-p))) (progn (ivy-alist-setting ivy-display-functions-alist caller))))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn 'auto) #'(lambda nil (let (...) (save-current-buffer ...))) update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* ((hist ...) (minibuffer-completion-table collection) (minibuffer-completion-predicate predicate) (ivy-height ...) (resize-mini-windows ...)) (if (and ivy-auto-select-single-candidate ivy--all-candidates ...) (progn ... ...) (condition-case err ... ...)) (if (eq ivy-exit ...) (progn ...)))) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or (plist-get extra-props :session) (if (or ... ... ...) nil caller)))) (if session (progn (progn (or (and ... t) (signal ... ...)) (let* (...) (aset v 27 ...))) (ivy--alist-set 'ivy--sessions session ivy-last)))) (ivy--cleanup)) (ivy-call))
(progn (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller))) (if init-fn (progn (funcall init-fn)))) (if (equal overriding-local-map '(keymap)) (progn (keyboard-quit))) (setq caller (or caller this-command)) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last (not (window-minibuffer-p))) (progn (ivy-alist-setting ivy-display-functions-alist caller))))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn 'auto) #'(lambda nil (let ... ...)) update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil (remove-hook ... setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (let* (... ... ... ... ...) (if ... ... ...) (if ... ...))) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or (plist-get extra-props :session) (if ... nil caller)))) (if session (progn (progn (or ... ...) (let* ... ...)) (ivy--alist-set 'ivy--sessions session ivy-last)))) (ivy--cleanup)) (ivy-call)))
(progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:predicate :require-match :initial-input :history :preselect :def :keymap :update-fn :sort :action :multi-action :unwind :re-builder :matcher :dynamic-collection :extra-props :caller :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:predicate :requir..." (car --cl-keys--)))))) (progn (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller))) (if init-fn (progn (funcall init-fn)))) (if (equal overriding-local-map '(keymap)) (progn (keyboard-quit))) (setq caller (or caller this-command)) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last (not ...)) (progn (ivy-alist-setting ivy-display-functions-alist caller))))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn 'auto) #'(lambda nil ...) update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun #'ivy--minibuffer-setup) setup-hook) (setq setup-hook #'(lambda nil ... ...)) (unwind-protect (progn (add-hook ... setup-hook) (let* ... ... ...)) (remove-hook 'minibuffer-setup-hook setup-hook))) (let ((session (or ... ...))) (if session (progn (progn ... ...) (ivy--alist-set ... session ivy-last)))) (ivy--cleanup)) (ivy-call))))
(let* ((predicate (car (cdr (plist-member --cl-rest-- ':predicate)))) (require-match (car (cdr (plist-member --cl-rest-- ':require-match)))) (initial-input (car (cdr (plist-member --cl-rest-- ':initial-input)))) (history (car (cdr (plist-member --cl-rest-- ':history)))) (preselect (car (cdr (plist-member --cl-rest-- ':preselect)))) (def (car (cdr (plist-member --cl-rest-- ':def)))) (keymap (car (cdr (plist-member --cl-rest-- ':keymap)))) (update-fn (car (cdr (plist-member --cl-rest-- ':update-fn)))) (sort (car (cdr (plist-member --cl-rest-- ':sort)))) (action (car (cdr (plist-member --cl-rest-- ':action)))) (multi-action (car (cdr (plist-member --cl-rest-- ':multi-action)))) (unwind (car (cdr (plist-member --cl-rest-- ':unwind)))) (re-builder (car (cdr (plist-member --cl-rest-- ':re-builder)))) (matcher (car (cdr (plist-member --cl-rest-- ':matcher)))) (dynamic-collection (car (cdr (plist-member --cl-rest-- ':dynamic-collection)))) (extra-props (car (cdr (plist-member --cl-rest-- ':extra-props)))) (caller (car (cdr (plist-member --cl-rest-- ':caller))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:predicate :requir..." (car --cl-keys--)))))) (progn (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller))) (if init-fn (progn (funcall init-fn)))) (if (equal overriding-local-map '(keymap)) (progn (keyboard-quit))) (setq caller (or caller this-command)) (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last)) (ivy--display-function (if (or ivy-recursive-last ...) (progn ...)))) (setq update-fn (or update-fn (ivy-alist-setting ivy-update-fns-alist caller))) (setq unwind (or unwind (ivy-alist-setting ivy-unwind-fns-alist caller))) (setq ivy-last (make-ivy-state :prompt (ivy--update-prompt prompt) :collection collection :predicate predicate :require-match require-match :initial-input initial-input :history history :preselect preselect :keymap keymap :update-fn (if (eq update-fn ...) #'... update-fn) :sort sort :action (ivy--compute-extra-actions action caller) :multi-action multi-action :frame (selected-frame) :window (selected-window) :buffer (current-buffer) :unwind unwind :re-builder re-builder :matcher matcher :dynamic-collection dynamic-collection :display-transformer-fn (ivy-alist-setting ivy--display-transformers-alist caller) :directory default-directory :extra-props extra-props :caller caller :def def)) (ivy--reset-state ivy-last) (unwind-protect (let ((fun ...) setup-hook) (setq setup-hook #'...) (unwind-protect (progn ... ...) (remove-hook ... setup-hook))) (let ((session ...)) (if session (progn ... ...))) (ivy--cleanup)) (ivy-call)))))
ivy-read("Workspace symbol: " (closure ((update-candidates closure ((workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes ... :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let (... ... it it-index) (ignore it it-index) (while list ... ...)) (nreverse result))) (ivy-update-candidates filtered-candidates)) (workspace-root . "/home/ville/.local/tmp/emacs_bug_test") (filtered-candidates) (unfiltered-candidates) (prev-query . "") (initial-input) (prompt . "Workspace symbol: ") (workspaces #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) t) (user-input) (let* ((parts (split-string user-input)) (query (or (car parts) "")) (filter-regexps? (mapcar #'regexp-quote (cdr parts)))) (if query (progn (if (string-equal prev-query query) (funcall update-candidates unfiltered-candidates filter-regexps?) (let (...) (lsp-request-async "workspace/symbol" ... ... :mode ... :cancel-token :workspace-symbol))))) (setq prev-query query)) (or filtered-candidates 0)) :dynamic-collection t :require-match t :initial-input nil :action lsp-ivy--workspace-symbol-action :caller lsp-ivy-workspace-symbol)
(let* ((prev-query nil) (unfiltered-candidates 'nil) (filtered-candidates nil) (workspace-root (lsp-workspace-root)) (update-candidates #'(lambda (all-candidates filter-regexps?) (setq filtered-candidates (let (result) (let ... ... ...) (nreverse result))) (ivy-update-candidates filtered-candidates)))) (ivy-read prompt #'(lambda (user-input) (let* ((parts (split-string user-input)) (query (or ... "")) (filter-regexps? (mapcar ... ...))) (if query (progn (if ... ... ...))) (setq prev-query query)) (or filtered-candidates 0)) :dynamic-collection t :require-match t :initial-input initial-input :action #'lsp-ivy--workspace-symbol-action :caller 'lsp-ivy-workspace-symbol))
lsp-ivy--workspace-symbol((#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 20/20 0x1571e441e5e5> :registered-server-capabilities nil :root "/home/ville/.local/tmp/emacs_bug_test" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command . lsp-clients--clangd-command) company-mode cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) (filter sentinel name environment-fn) (let (... ... ...) (let* ... ... ... ... ...))) :test? (closure ((test-command) (command . lsp-clients--clangd-command) company-mode cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines dap-ui-menu-items dap-auto-configure-mode company-backends t) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1571e46636a9> :request-handlers #<hash-table equal 0/65 0x1571e46686cd> :response-handlers #<hash-table eql 1/65 0x1571e46686ed> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x1571e466a2cd> :action-handlers #<hash-table equal 0/65 0x1571e466a2ed> :major-modes (c-mode c++-mode objc-mode) :activation-fn nil :priority -1 :server-id clangd :multi-root nil :initialization-options nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x1571e466b6cd> :download-server-fn nil :download-in-progress? nil :buffers nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x1571e499fac9> :watches #<hash-table equal 0/65 0x1571e49a1cd9> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1571e495c501> :work-done-tokens #<hash-table equal 0/65 0x1571e495c901>)) "Workspace symbol: " nil)
lsp-ivy-workspace-symbol(nil)
funcall-interactively(lsp-ivy-workspace-symbol nil)
call-interactively(lsp-ivy-workspace-symbol record nil)
command-execute(lsp-ivy-workspace-symbol record)
execute-extended-command(nil "lsp-ivy-workspace-symbol" "lsp-ivy-wo")
funcall-interactively(execute-extended-command nil "lsp-ivy-workspace-symbol" "lsp-ivy-wo")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
lsp-log:
Command "clangd" is present on the path.
Command "clangd" is present on the path.
Found the following clients for /home/ville/.local/tmp/emacs_bug_test/main.c: (server-id clangd, priority -1)
The following clients were selected based on priority: (server-id clangd, priority -1)
I can't reproduce with latest master, neither with jdtls
, clangd
nor ccls
. Try updating lsp-ivy
. Are you using something like ivy-prescient
?
I can't reproduce with latest master, neither with
jdtls
,clangd
norccls
. Try updatinglsp-ivy
. Are you using something likeivy-prescient
?
I have: lsp-ivy 20201113.2220
installed according to package-list-packages
. It is the most recent version available as far as i can tell. I already removed all of my packages and installed everything from scratch yesterday, 2021-01-08, when trying to figure out if could "fix" it my self.
I am not using ivy-prescient
. I am not quite sure what lsp-mode's lsp-start-plain.el
does exactly, but I tried to choose a fairly minimal set of packages in step 1.
For reference lsp-start-plain.el.
I can reproduce. This is due to an upstream change in ivy
around ivy-update-candidates
. I'll look into this.
You could downgrade ivy to before 71c59aecf669142ebe264fac8ff7b440c0c71712.
Alright, I'll see if I can find out how to downgrade packages whilst waiting if ivy
fixes this. Thanks.
Alternatively, you can use this as a workaround:
(defun ivy-update-candidates-dynamic-collection-workaround-a (old-fun &rest args)
(cl-letf (((symbol-function #'completion-metadata) #'ignore))
(apply old-fun args)))
(advice-add #'ivy-update-candidates :around #'ivy-update-candidates-dynamic-collection-workaround-a)
Thanks, that's a way better workaround than me altering ivy-update-candidates
directly.
This is fixed upstream, so this issue can be closed.
@ville-h you can remove the workaround if you update ivy.
starting lsp-start-plain, and then package-install lsp-ivy:
- LSP :: lsp-mode 20220625.46, Emacs 28.1, darwin
lsp-ivy-workspace-symbol:
#f(compiled-function (user-input) #<bytecode -0x175eee4b3e439c60>)("" nil nil)
ivy--dynamic-collection-cands("")
ivy--reset-state(#s(ivy-state :prompt "Workspace symbol: " :collection #f(compiled-function (user-input) #<bytecode -0x175eee4b3e439c60>) :predicate nil :require-match t :initial-input nil :history nil :preselect nil :keymap nil :update-fn nil :sort nil :frame #<frame *Minibuf-1* - GNU Emacs at Alexandres-MacBook-Pro.local 0x1260d32d8> :window #<window 3 on *scratch*> :buffer #<buffer *scratch*> :text nil :action (1 ("o" lsp-ivy--workspace-symbol-action "default") ("i" ivy--action-insert "insert") ("w" ivy--action-copy "copy")) :unwind nil :re-builder ivy--regex-plus :matcher nil :dynamic-collection t :display-transformer-fn nil :directory "~/" :caller lsp-ivy-workspace-symbol :current nil :def nil :ignore t :multi-action nil :extra-props nil))
ivy-read("Workspace symbol: " #f(compiled-function (user-input) #<bytecode -0x175eee4b3e439c60>) :dynamic-collection t :require-match t :initial-input nil :action lsp-ivy--workspace-symbol-action :caller lsp-ivy-workspace-symbol)
lsp-ivy--workspace-symbol(nil "Workspace symbol: " nil)
lsp-ivy-workspace-symbol(nil)
funcall-interactively(lsp-ivy-workspace-symbol nil)
call-interactively(lsp-ivy-workspace-symbol record nil)
command-execute(lsp-ivy-workspace-symbol record)
execute-extended-command(nil "lsp-ivy-workspace-symbol" "lsp-ivy-workspace-s")
funcall-interactively(execute-extended-command nil "lsp-ivy-workspace-symbol" "lsp-ivy-workspace-s")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
I am still seeing this issue. Is it still an issue for other people? Any news on it?