PyvesB / eclipse-solargraph

:gem: Ruby development tools for Eclipse.
https://marketplace.eclipse.org/content/ruby-solargraph
Eclipse Public License 2.0
30 stars 6 forks source link

Outline stuck on "Computing symbols" #28

Closed mkolmar closed 1 year ago

mkolmar commented 1 year ago

When a Ruby file is opened, the outline says "Computing symbols", which does not finish. This had worked for a long time.

I think this issue came about after all gems were removed, and bundler was run on all projects to reinstall most gems. Then installed solargraph and readapt. Backport gem was missing, and had to be installed for readapt to launch. Also ran "yard gems". Using RBENV and shims.

Eclipse runs solargraph server. I don't know if readapt is supposed to be running, but readapt is not launched. I don't see any relevant logging. Tried running readapt from console, in which case Eclipse log shows:

java.util.concurrent.TimeoutException at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021) at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:425) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)

Uninstalled/reinstalled Ruby Solargraph plugin in Eclipse too. Confirmed preferences. I don't see a log for Debug Readapt.

Any ideas about how to debug this?

Eclipse IDE 2022-03

$ ruby -v ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] $ solargraph -v 0.49.0 $ readapt -v 1.4.4

mkolmar commented 1 year ago

Installed Eclipse IDE 2023-06, which reinstalls plugins. No change. Eclipse launches "solargraph stdio". I do see in Progress pane that Solargraph Language Server is "Mapping workspace" but no files have been processed. Below that, Progress pane shows 6 or 7 items for Solargraph Language Server with no other detail.

mkolmar commented 1 year ago

Uninstalled all gems again, and installed solargraph first. Outline worked. Installed readapt and outline still worked. Ran bundler again on several projects.

Rubocop was not working. Eclipse showed a tiny warning from LSP in the lower-right corner about Gemspec/DateAssignment cop deprecation. Found a reference to this issue at https://github.com/rubocop/rubocop/issues/10753. Attempted to resolve the issue with that cop, finally commented out the cop and its (future) replacement. At this time, Rubocop warnings display in the editor as well.

Clearly something went wrong when I refreshed gems last time. It would be helpful if more information were shown in Eclipse about the nature of the failure, or in logs.

PyvesB commented 1 year ago

Hello @mkolmar! 👋🏻

Glad you resolved your problem and thanks for detailing the investigation!

It would be helpful if more information were shown in Eclipse about the nature of the failure, or in logs.

Roger that, I'll see if there's anything more I can do in that space for the next update. It's always a bit tricky, as the language server and its gems and run in a separate process, not all information can easily be accessed from a Java program. :)