emacs-lsp / lsp-java

lsp-mode :heart: java
https://emacs-lsp.github.io/lsp-java
GNU General Public License v3.0
647 stars 90 forks source link

Warnings when using Java SE Version 19 #422

Open dschrempf opened 1 year ago

dschrempf commented 1 year ago

Describe the bug When working on projects with JDK 19, the language server reports a warning:

[Java] Build path specifies execution environment JavaSE-17. There are no JREs installed in the workspace that are strictly compatible with this environment.  (0:0)

Somehow, the .classpath file always includes a line

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>

which may be (or not?) the cuprit.

I am using a standard, empty, Spring project with Gradle (but same thing happened with Maven), and Java 19.

To Reproduce

Expected behavior No warnings about JDK (JRE) 17 on a project using JDK 19.

dschrempf commented 1 year ago

When using

(setq lsp-java-jdt-download-url "https://download.eclipse.org/jdtls/milestones/1.20.0/jdt-language-server-1.20.0-202302201605.tar.gz")

there are no warnings.

However, I do get an error message (seemingly without consequences, because all works fine):

Error processing message (args-out-of-range [] 2).

Do the newer servers also support older Java versions? If so, does it make sense to update the server?

yyoncho commented 1 year ago

@dschrempf use M-x toggle-debug-on-error to find where the error comes from

dschrempf commented 1 year ago
Debugger entered--Lisp error: (args-out-of-range [] 2)
  seq-elt([] 2)
  lsp-java-boot--workspace-execute-client-command(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x2732225> :registered-server-capabilities (#s(lsp--registered-capability :id "84ed3e6f-ff2d-4d5c-af85-9d8f737178f7" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "b5bff3cf-ba4f-4900-8abd-1e24d440c01d" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0xf878a9>) #s(lsp--registered-capability :id "e3709b8e-a026-4446-9c46-abe59f2aa5ea" :method "textDocument/rename" :options #<hash-table equal 1/1 0x284ded9>) #s(lsp--registered-capability :id "4e7fa2a7-0b92-4682-94a7-47cea719bdf5" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x1b77299>) #s(lsp--registered-capability :id "4088ebef-fbeb-483d-af19-afdbba58ec26" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x2822483>) #s(lsp--registered-capability :id "cfdb7ea3-d61d-47d7-a8ad-d56e1ca8c91b" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "cc23ddec-9c18-43f1-97ed-5bf59b9c498b" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "f1907c78-126d-4dcf-af68-5f7c371231ab" :method "textDocument/completion" :options #<hash-table equal 2/2 0x1ca033d>) #s(lsp--registered-capability :id "580c8bd4-777f-47ea-be52-ca13f4d3daa1" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "c9c7d664-9071-4353-ac7f-25a6b2e07285" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "6f7eb459-2feb-486d-8533-8043f6112ec8" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "89e51330-4758-488d-9574-ffccd0f539bd" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "580b1676-19b9-4e01-9e89-abcd827f5cd9" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "eb676cca-2a21-48c3-9e57-cb3863139bec" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "8f9f6dc5-00f7-4c4e-9184-fe91b8ee41b0" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1e9ae39>) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x2846a47>)) :root "/home/dominik/Scratch/java/demo" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x826640c1050efe1>) :test\? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x138a20d> :request-handlers #<hash-table equal 1/65 0x138a3b7> :response-handlers #<hash-table eql 0/65 0x1476e73> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1476e53> :action-handlers #<hash-table equal 11/65 0x143e133> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options #f(compiled-function () #<bytecode 0xe11637d3ab7a544>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x47e81708c5970b8>) :before-file-open-fn #f(compiled-function (workspace) #<bytecode 0x16bf7cd5cd78422b>) :initialized-fn #f(compiled-function (workspace) #<bytecode 0x18530188181b0f3b>) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x143e153> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer DemoApplication.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x2fb8ab1> :watches #<hash-table equal 0/65 0x1977f29> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1977f49> :work-done-tokens #<hash-table equal 0/65 0x1977f69>) #<hash-table equal 2/2 0x258ed23>)
  lsp--on-request(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x2732225> :registered-server-capabilities (#s(lsp--registered-capability :id "84ed3e6f-ff2d-4d5c-af85-9d8f737178f7" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "b5bff3cf-ba4f-4900-8abd-1e24d440c01d" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0xf878a9>) #s(lsp--registered-capability :id "e3709b8e-a026-4446-9c46-abe59f2aa5ea" :method "textDocument/rename" :options #<hash-table equal 1/1 0x284ded9>) #s(lsp--registered-capability :id "4e7fa2a7-0b92-4682-94a7-47cea719bdf5" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x1b77299>) #s(lsp--registered-capability :id "4088ebef-fbeb-483d-af19-afdbba58ec26" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x2822483>) #s(lsp--registered-capability :id "cfdb7ea3-d61d-47d7-a8ad-d56e1ca8c91b" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "cc23ddec-9c18-43f1-97ed-5bf59b9c498b" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "f1907c78-126d-4dcf-af68-5f7c371231ab" :method "textDocument/completion" :options #<hash-table equal 2/2 0x1ca033d>) #s(lsp--registered-capability :id "580c8bd4-777f-47ea-be52-ca13f4d3daa1" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "c9c7d664-9071-4353-ac7f-25a6b2e07285" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "6f7eb459-2feb-486d-8533-8043f6112ec8" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "89e51330-4758-488d-9574-ffccd0f539bd" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "580b1676-19b9-4e01-9e89-abcd827f5cd9" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "eb676cca-2a21-48c3-9e57-cb3863139bec" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "8f9f6dc5-00f7-4c4e-9184-fe91b8ee41b0" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1e9ae39>) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x2846a47>)) :root "/home/dominik/Scratch/java/demo" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x826640c1050efe1>) :test\? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x138a20d> :request-handlers #<hash-table equal 1/65 0x138a3b7> :response-handlers #<hash-table eql 0/65 0x1476e73> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1476e53> :action-handlers #<hash-table equal 11/65 0x143e133> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options #f(compiled-function () #<bytecode 0xe11637d3ab7a544>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x47e81708c5970b8>) :before-file-open-fn #f(compiled-function (workspace) #<bytecode 0x16bf7cd5cd78422b>) :initialized-fn #f(compiled-function (workspace) #<bytecode 0x18530188181b0f3b>) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x143e153> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer DemoApplication.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x2fb8ab1> :watches #<hash-table equal 0/65 0x1977f29> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1977f49> :work-done-tokens #<hash-table equal 0/65 0x1977f69>) #<hash-table equal 4/4 0xf8798d>)
  lsp--parser-on-message(#<hash-table equal 4/4 0xf8798d> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x2732225> :registered-server-capabilities (#s(lsp--registered-capability :id "84ed3e6f-ff2d-4d5c-af85-9d8f737178f7" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "b5bff3cf-ba4f-4900-8abd-1e24d440c01d" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0xf878a9>) #s(lsp--registered-capability :id "e3709b8e-a026-4446-9c46-abe59f2aa5ea" :method "textDocument/rename" :options #<hash-table equal 1/1 0x284ded9>) #s(lsp--registered-capability :id "4e7fa2a7-0b92-4682-94a7-47cea719bdf5" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x1b77299>) #s(lsp--registered-capability :id "4088ebef-fbeb-483d-af19-afdbba58ec26" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x2822483>) #s(lsp--registered-capability :id "cfdb7ea3-d61d-47d7-a8ad-d56e1ca8c91b" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "cc23ddec-9c18-43f1-97ed-5bf59b9c498b" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "f1907c78-126d-4dcf-af68-5f7c371231ab" :method "textDocument/completion" :options #<hash-table equal 2/2 0x1ca033d>) #s(lsp--registered-capability :id "580c8bd4-777f-47ea-be52-ca13f4d3daa1" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "c9c7d664-9071-4353-ac7f-25a6b2e07285" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "6f7eb459-2feb-486d-8533-8043f6112ec8" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "89e51330-4758-488d-9574-ffccd0f539bd" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "580b1676-19b9-4e01-9e89-abcd827f5cd9" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "eb676cca-2a21-48c3-9e57-cb3863139bec" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "8f9f6dc5-00f7-4c4e-9184-fe91b8ee41b0" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/1 0x1e9ae39>) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x2846a47>)) :root "/home/dominik/Scratch/java/demo" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x826640c1050efe1>) :test\? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x138a20d> :request-handlers #<hash-table equal 1/65 0x138a3b7> :response-handlers #<hash-table eql 0/65 0x1476e73> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x1476e53> :action-handlers #<hash-table equal 11/65 0x143e133> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options #f(compiled-function () #<bytecode 0xe11637d3ab7a544>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x47e81708c5970b8>) :before-file-open-fn #f(compiled-function (workspace) #<bytecode 0x16bf7cd5cd78422b>) :initialized-fn #f(compiled-function (workspace) #<bytecode 0x18530188181b0f3b>) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x143e153> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer DemoApplication.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x2fb8ab1> :watches #<hash-table equal 0/65 0x1977f29> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x1977f49> :work-done-tokens #<hash-table equal 0/65 0x1977f69>))
  #f(compiled-function (msg) #<bytecode -0x1986c10e684740ae>)(#<hash-table equal 4/4 0xf8798d>)
  mapc(#f(compiled-function (msg) #<bytecode -0x1986c10e684740ae>) (#<hash-table equal 4/4 0x1e9add9> #<hash-table equal 3/3 0x2e2498f> #<hash-table equal 4/4 0x2e249cf> #<hash-table equal 4/4 0x17ae4c9> #<hash-table equal 4/4 0x17ae529> #<hash-table equal 4/4 0xecda59> #<hash-table equal 4/4 0x1a7cc21> #<hash-table equal 4/4 0x10159e9> #<hash-table equal 4/4 0x1ca02ad> #<hash-table equal 4/4 0x281e061> #<hash-table equal 4/4 0x24af7c9> #<hash-table equal 4/4 0x24af883> #<hash-table equal 4/4 0x1b77209> #<hash-table equal 4/4 0x1b772b9> #<hash-table equal 4/4 0x12bf0e9> #<hash-table equal 4/4 0xf878fd> #<hash-table equal 4/4 0xf8798d> #<hash-table equal 3/3 0x258ed5b>))
  #f(compiled-function (proc input) #<bytecode -0xd19d4931ce4623d>)(#<process jdtls> "Content-Length: 651\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"...")

For your information, I wrote about my experience with lsp-java and how to set up a project-specific environment using Nix Flakes: https://dschrempf.github.io/emacs/2023-03-02-emacs-java-and-nix/. Thanks for working on lsp-java!

ahmedriza commented 1 year ago

Getting a similar error when using https://download.eclipse.org/jdtls/milestones/1.23.0/

Debugger entered--Lisp error: (args-out-of-range [] 2)
  seq-elt([] 2)
  lsp-java-boot--workspace-execute-client-command(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x50c0ba99> :registered-server-capabilities (#s(lsp--registered-capability :id "ffeb7086-7e4a-438a-9ad1-58925b1fb1b9" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "d0966b0f-242e-414b-bb56-83ea1625d8f4" :method "textDocument/foldingRange" :options nil) #s(lsp--registered-capability :id "28e0d588-1082-466c-8935-e0061b51c377" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0x4466d839>) #s(lsp--registered-capability :id "ff10f933-8ae6-4cbb-b0ec-0004cbdd53ab" :method "textDocument/rename" :options #<hash-table equal 1/1 0x50c0afc1>) #s(lsp--registered-capability :id "03c63dec-167b-44e7-99d0-8a00b91e0095" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x45c236e9>) #s(lsp--registered-capability :id "98ce87fd-7d2a-4c55-be68-7efcc7195bb2" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x45c25739>) #s(lsp--registered-capability :id "31a23310-eb26-41e6-8771-6b93acc5a2ed" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "612b59e8-73e2-4233-b967-2cf85177f179" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "60e5b0d6-5fdb-4bc5-8e6c-02b1ee794ead" :method "textDocument/completion" :options #<hash-table equal 2/2 0x45c14069>) #s(lsp--registered-capability :id "f5a13797-57c5-44ae-bcbc-8fbbe5e4bbb9" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "dc77407d-8087-4f46-b031-8ba1d735a9a8" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "0861037b-512d-4581-9d59-c73a49bfa119" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "2fa2147e-7d9b-4b21-bd8d-daef111c66ae" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "e6418172-bb77-4f11-90c5-1a651a1f4150" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "29d87854-71e1-4124-abc4-63c9473ab1c6" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x50c17425>)) :root "/work/java/org.onedigit.risk.store" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x1e8852f70f880e9f>) :test\? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x445bd311> :request-handlers #<hash-table equal 1/65 0x445bd53f> :response-handlers #<hash-table eql 1/65 0x445bdead> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x445bdbb3> :action-handlers #<hash-table equal 11/65 0x445bd55f> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options #f(compiled-function () #<bytecode 0x16f982fa32e9c61>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x47e8171aa857c38>) :before-file-open-fn #f(compiled-function (workspace) #<bytecode 0xe6ba39d9236b00b>) :initialized-fn #f(compiled-function (workspace) #<bytecode 0x1a9a7cf4f13235fb>) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x445be0db> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer WriteRoutes.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x44615681> :watches #<hash-table equal 0/65 0x44615957> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x4466692f> :work-done-tokens #<hash-table equal 0/65 0x44666c29>) #<hash-table equal 2/2 0x4466f18d>)
  lsp--on-request(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x50c0ba99> :registered-server-capabilities (#s(lsp--registered-capability :id "ffeb7086-7e4a-438a-9ad1-58925b1fb1b9" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "d0966b0f-242e-414b-bb56-83ea1625d8f4" :method "textDocument/foldingRange" :options nil) #s(lsp--registered-capability :id "28e0d588-1082-466c-8935-e0061b51c377" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0x4466d839>) #s(lsp--registered-capability :id "ff10f933-8ae6-4cbb-b0ec-0004cbdd53ab" :method "textDocument/rename" :options #<hash-table equal 1/1 0x50c0afc1>) #s(lsp--registered-capability :id "03c63dec-167b-44e7-99d0-8a00b91e0095" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x45c236e9>) #s(lsp--registered-capability :id "98ce87fd-7d2a-4c55-be68-7efcc7195bb2" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x45c25739>) #s(lsp--registered-capability :id "31a23310-eb26-41e6-8771-6b93acc5a2ed" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "612b59e8-73e2-4233-b967-2cf85177f179" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "60e5b0d6-5fdb-4bc5-8e6c-02b1ee794ead" :method "textDocument/completion" :options #<hash-table equal 2/2 0x45c14069>) #s(lsp--registered-capability :id "f5a13797-57c5-44ae-bcbc-8fbbe5e4bbb9" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "dc77407d-8087-4f46-b031-8ba1d735a9a8" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "0861037b-512d-4581-9d59-c73a49bfa119" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "2fa2147e-7d9b-4b21-bd8d-daef111c66ae" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "e6418172-bb77-4f11-90c5-1a651a1f4150" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "29d87854-71e1-4124-abc4-63c9473ab1c6" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x50c17425>)) :root "/work/java/org.onedigit.risk.store" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x1e8852f70f880e9f>) :test\? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x445bd311> :request-handlers #<hash-table equal 1/65 0x445bd53f> :response-handlers #<hash-table eql 1/65 0x445bdead> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x445bdbb3> :action-handlers #<hash-table equal 11/65 0x445bd55f> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options #f(compiled-function () #<bytecode 0x16f982fa32e9c61>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x47e8171aa857c38>) :before-file-open-fn #f(compiled-function (workspace) #<bytecode 0xe6ba39d9236b00b>) :initialized-fn #f(compiled-function (workspace) #<bytecode 0x1a9a7cf4f13235fb>) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x445be0db> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer WriteRoutes.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x44615681> :watches #<hash-table equal 0/65 0x44615957> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x4466692f> :work-done-tokens #<hash-table equal 0/65 0x44666c29>) #<hash-table equal 4/4 0x4466f12f>)
  lsp--parser-on-message(#<hash-table equal 4/4 0x4466f12f> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 10/10 0x50c0ba99> :registered-server-capabilities (#s(lsp--registered-capability :id "ffeb7086-7e4a-438a-9ad1-58925b1fb1b9" :method "textDocument/selectionRange" :options nil) #s(lsp--registered-capability :id "d0966b0f-242e-414b-bb56-83ea1625d8f4" :method "textDocument/foldingRange" :options nil) #s(lsp--registered-capability :id "28e0d588-1082-466c-8935-e0061b51c377" :method "textDocument/codeAction" :options #<hash-table equal 2/2 0x4466d839>) #s(lsp--registered-capability :id "ff10f933-8ae6-4cbb-b0ec-0004cbdd53ab" :method "textDocument/rename" :options #<hash-table equal 1/1 0x50c0afc1>) #s(lsp--registered-capability :id "03c63dec-167b-44e7-99d0-8a00b91e0095" :method "textDocument/signatureHelp" :options #<hash-table equal 1/1 0x45c236e9>) #s(lsp--registered-capability :id "98ce87fd-7d2a-4c55-be68-7efcc7195bb2" :method "textDocument/onTypeFormatting" :options #<hash-table equal 2/2 0x45c25739>) #s(lsp--registered-capability :id "31a23310-eb26-41e6-8771-6b93acc5a2ed" :method "textDocument/rangeFormatting" :options nil) #s(lsp--registered-capability :id "612b59e8-73e2-4233-b967-2cf85177f179" :method "textDocument/formatting" :options nil) #s(lsp--registered-capability :id "60e5b0d6-5fdb-4bc5-8e6c-02b1ee794ead" :method "textDocument/completion" :options #<hash-table equal 2/2 0x45c14069>) #s(lsp--registered-capability :id "f5a13797-57c5-44ae-bcbc-8fbbe5e4bbb9" :method "textDocument/implementation" :options nil) #s(lsp--registered-capability :id "dc77407d-8087-4f46-b031-8ba1d735a9a8" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "0861037b-512d-4581-9d59-c73a49bfa119" :method "textDocument/references" :options nil) #s(lsp--registered-capability :id "2fa2147e-7d9b-4b21-bd8d-daef111c66ae" :method "textDocument/hover" :options nil) #s(lsp--registered-capability :id "e6418172-bb77-4f11-90c5-1a651a1f4150" :method "textDocument/typeDefinition" :options nil) #s(lsp--registered-capability :id "29d87854-71e1-4124-abc4-63c9473ab1c6" :method "textDocument/definition" :options nil) #s(lsp--registered-capability :id "test-id" :method "workspace/didChangeWatchedFiles" :options #<hash-table equal 1/65 0x50c17425>)) :root "/work/java/org.onedigit.risk.store" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode -0x1e8852f70f880e9f>) :test\? lsp-java--locate-server-jar) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 5/65 0x445bd311> :request-handlers #<hash-table equal 1/65 0x445bd53f> :response-handlers #<hash-table eql 1/65 0x445bdead> :prefix-function nil :uri-handlers #<hash-table equal 1/65 0x445bdbb3> :action-handlers #<hash-table equal 11/65 0x445bd55f> :major-modes (java-mode java-ts-mode jdee-mode) :activation-fn nil :priority 0 :server-id jdtls :multi-root t :initialization-options #f(compiled-function () #<bytecode 0x16f982fa32e9c61>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode -0x47e8171aa857c38>) :before-file-open-fn #f(compiled-function (workspace) #<bytecode 0xe6ba39d9236b00b>) :initialized-fn #f(compiled-function (workspace) #<bytecode 0x1a9a7cf4f13235fb>) :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x445be0db> :download-server-fn lsp-java--ensure-server :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process jdtls> :cmd-proc #<process jdtls> :buffers (#<buffer WriteRoutes.java>) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x44615681> :watches #<hash-table equal 0/65 0x44615957> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 0/65 0x4466692f> :work-done-tokens #<hash-table equal 0/65 0x44666c29>))
  #f(compiled-function (msg) #<bytecode 0x10fd589a66d6458a>)(#<hash-table equal 4/4 0x4466f12f>)
  mapc(#f(compiled-function (msg) #<bytecode 0x10fd589a66d6458a>) (#<hash-table equal 4/4 0x45c2732d> #<hash-table equal 4/4 0x45c25659> #<hash-table equal 4/4 0x45c257cf> #<hash-table equal 3/3 0x45c23861> #<hash-table equal 3/3 0x50c0acf9> #<hash-table equal 4/4 0x50c0aedd> #<hash-table equal 4/4 0x4466d755> #<hash-table equal 4/4 0x4466ed01> #<hash-table equal 4/4 0x4466ef03> #<hash-table equal 4/4 0x4466f12f> #<hash-table equal 3/3 0x4466f31b>))
  #f(compiled-function (proc input) #<bytecode -0x22f2eba9e10a6a7>)(#<process jdtls> "ms\":{\"registrations\":[{\"id\":\"31a23310-eb26-41e6-8771-6b93acc5a2ed\",\"method\":\"textDocument/rangeFormatting\"}]}}Content-Length: 262\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"10\",\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"98ce87fd-7d2a-4c55-be68-7efcc7195bb2\",\"method\":\"textDocument/onTypeFormatting\",\"registerOptions\":{\"firstTriggerCharacter\":\";\",\"moreTriggerCharacter\":[\"\\n\",\"}\"]}}]}}Content-Length: 227\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"11\",\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"03c63dec-167b-44e7-99d0-8a00b91e0095\",\"method\":\"textDocument/signatureHelp\",\"registerOptions\":{\"triggerCharacters\":[\"(\",\",\"]}}]}}Content-Length: 194\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"language/progressReport\",\"params\":{\"id\":\"07242155-944c-4abd-9786-e891656fe2cb\",\"task\":\"Background task\",\"status\":\"0% \",\"totalWork\":1000,\"workDone\":0,\"complete\":false}}Content-Length: 152\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"language/eventNotification\",\"params\":{\"eventType\":100,\"data\":\"file:/System/Volumes/Data/work/java/org.onedigit.risk.store/\"}}Content-Length: 213\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"12\",\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"ff10f933-8ae6-4cbb-b0ec-0004cbdd53ab\",\"method\":\"textDocument/rename\",\"registerOptions\":{\"prepareProvider\":true}}]}}Content-Length: 349\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"13\",\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"28e0d588-1082-466c-8935-e0061b51c377\",\"method\":\"textDocument/codeAction\",\"registerOptions\":{\"codeActionKinds\":[\"quickfix\",\"refactor\",\"refactor.extract\",\"refactor.inline\",\"refactor.rewrite\",\"source\",\"source.organizeImports\"],\"resolveProvider\":true}}]}}Content-Length: 176\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"14\",\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"d0966b0f-242e-414b-bb56-83ea1625d8f4\",\"method\":\"textDocument/foldingRange\"}]}}Content-Length: 178\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"15\",\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"ffeb7086-7e4a-438a-9ad1-58925b1fb1b9\",\"method\":\"textDocument/selectionRange\"}]}}Content-Length: 135\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":\"16\",\"method\":\"workspace/executeClientCommand\",\"params\":{\"command\":\"_java.reloadBundles.command\",\"arguments\":[]}}Content-Length: 205\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"language/progressReport\",\"params\":{\"id\":\"b8606bdf-df2d-420e-8d97-efa3efd8d2f1\",\"task\":\"Synchronizing projects\",\"status\":\"100% \",\"totalWork\":1000,\"workDone\":1000,\"complete\":true}}")
yyoncho commented 1 year ago

@ahmedriza that would fix it: https://github.com/emacs-lsp/lsp-java/pull/431

ahmedriza commented 1 year ago

@yyoncho fantastic stuff. That works great. Really relieved to be removed from the shackles of heavy IDEs.

sincebyte commented 1 year ago

the most important thing in doom emacs is unpin lsp-java package