plugins is not working for eclipse 09-2020 on MacOS
MShahzaib opened this issue · 6 comments
The plugin is not working, giving errors. The path for the solargraph is correct. No completion is being suggested.
java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2086)
at org.eclipse.lsp4e.operations.hover.LSPTextHover.getHoverInfo(LSPTextHover.java:131)
at org.eclipse.ui.internal.genericeditor.hover.CompositeTextHover.getHoverInfo2(CompositeTextHover.java:60)
at org.eclipse.jface.text.TextViewerHoverManager$1.run(TextViewerHoverManager.java:155)
Caused by: java.util.concurrent.CancellationException
at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2468)
at org.eclipse.lsp4e.LanguageServerWrapper.stop(LanguageServerWrapper.java:400)
at org.eclipse.lsp4e.LanguageServerWrapper.start(LanguageServerWrapper.java:211)
at org.eclipse.lsp4e.LanguageServerWrapper.getInitializedServer(LanguageServerWrapper.java:659)
at org.eclipse.lsp4e.LanguageServiceAccessor.lambda$14(LanguageServiceAccessor.java:589)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:550)
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:517)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLanguageServers(LanguageServiceAccessor.java:602)
at org.eclipse.lsp4e.operations.highlight.HighlightReconcilingStrategy.collectHighlights(HighlightReconcilingStrategy.java:202)
at org.eclipse.lsp4e.operations.highlight.HighlightReconcilingStrategy.lambda$0(HighlightReconcilingStrategy.java:125)
at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:185)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1950)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2085)
at org.eclipse.lsp4e.operations.hover.LSPTextHover.getHoverRegion(LSPTextHover.java:225)
at org.eclipse.ui.internal.genericeditor.hover.CompositeTextHover.getHoverRegion(CompositeTextHover.java:101)
at org.eclipse.jface.text.TextViewerHoverManager.computeInformation(TextViewerHoverManager.java:128)
at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:1101)
at org.eclipse.jface.text.AbstractHoverInformationControlManager$MouseTracker.mouseHover(AbstractHoverInformationControlManager.java:511)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:212)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3789)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Hello @MShahzaib,
Thanks for reporting and sorry to hear about that. Could you please go to Preferences -> Language Servers -> Logs and enable the Solargraph entry? After you restart Eclipse, the Console view should display the messages exchanged between the server and the client, and hopefully shed a bit more light on the issue.
Hi, thank you for the quick reply, here are the logs.
[t=1601030930312] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 60
[t=1601030930312] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"2","method":"shutdown","params":null}
[t=1601030930312] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 47
[t=1601030930312] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","method":"exit","params":null}
[t=1601030930325] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 1386
[t=1601030930325] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":9887,"rootPath":"/Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","rootUri":"file:///Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
[t=1601030931040] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 60
[t=1601030931040] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"2","method":"shutdown","params":null}
[t=1601030931040] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 47
[t=1601030931040] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","method":"exit","params":null}
[t=1601030931049] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 1386
[t=1601030931049] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":9887,"rootPath":"/Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","rootUri":"file:///Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
[t=1601030940458] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 60
[t=1601030940458] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"2","method":"shutdown","params":null}
[t=1601030940459] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 47
[t=1601030940459] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","method":"exit","params":null}
[t=1601030940474] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 1386
[t=1601030940474] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":9887,"rootPath":"/Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","rootUri":"file:///Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
[t=1601030986898] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 60
[t=1601030986898] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"2","method":"shutdown","params":null}
[t=1601030986898] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 47
[t=1601030986898] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","method":"exit","params":null}
[t=1601030986910] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 1386
[t=1601030986910] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":9887,"rootPath":"/Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","rootUri":"file:///Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
[t=1601030988379] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 60
[t=1601030988379] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"2","method":"shutdown","params":null}
[t=1601030988379] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 47
[t=1601030988379] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","method":"exit","params":null}
[t=1601030988389] LSP4E to io.github.pyvesb.eclipse_solargraph:
Content-Length: 1386
[t=1601030988389] LSP4E to io.github.pyvesb.eclipse_solargraph:
{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":9887,"rootPath":"/Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","rootUri":"file:///Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"off"}}
From what I can tell, Eclipse is correctly issuing the initialize
request, but there doesn't seem to be any response from the language server, so the IDE eventually gives up and shuts down the server. The times between initialisation and shutdown differ quite a bit, as they depend on what operations you're triggering and how the various timeouts in lsp4e are configured.
The annoying bit is that the above logs are simply the JSON messages exchanged between the server and the client, but we don't get the logs from the language server itself. These would indicate whether there's an exception or slowness at startup. This seems like a limitation in lsp4e, I'm wondering how easy if would be to fix.
If you're up for spending a bit more time on the investigation, you can still get the server's logs by launching the plugin in a developer environment. If you follow the instructions in the README, you'll be able to import the project in a suitable Eclipse distribution. By following the last bullet point in the README, you can then launch the project in a separate Eclipse Application and import some Ruby code in there. In the Console view of the first Eclipse instance (the one where you imported the project), you'll be able to see the Solargraph server logs! Let me know if this makes sense. :)
@MShahzaib did you get a chance to look into the above?
As an alternative for easier debugging, start Solargraph manually from the command line in socket mode (solargraph socket
) and in a separate terminal tab run the following command:
curl -X POST http://127.0.0.1:7658 -d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":9887,"rootPath":"/Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","rootUri":"file:///Users/mshahzaib/Desktop/dev/lansa-lax/ruby/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{}}},"clientName":"Eclipse IDE","trace":"on"}}'
Worth trying out with the latest version of the plugin, 0.5.0, there were some improvements there.