Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin server version #12

Closed
rwols opened this issue May 27, 2021 · 3 comments · Fixed by #22
Closed

Pin server version #12

rwols opened this issue May 27, 2021 · 3 comments · Fixed by #22

Comments

@rwols
Copy link
Member

rwols commented May 27, 2021

Instead of always getting the latest version, please pin the server version.

When the download site has problems and there happens to be a new version, all users are stuck with a hanging download.

@LDAP
Copy link
Collaborator

LDAP commented Jun 14, 2021

Is this really a solution? What if we bump the server version and then the site has problems?

@MrSnugglesGH
Copy link

I'd like to report my experience using LSP-jdtls on August 1st, 2021. Note, however, that today (August 4th, 2021) I no longer experience any problems. If the following problem appears again in the future or someone else experiences the same problem, this may be helpful to know as a workaround is given at the end of this comment.


Problem. Opening any .java file leads to completely unpredictable behavior of LSP-jdtls.

Basically, I can expect one of the following three types of behavior when I open any .java file.

  1. Everything works as expected - Everything is underlined as it should be, pop-up windows are displayed on hover, Definition & References & Rename work and so on...

  2. It works... sort of... - Everything works as in 1. However, there is considerable lag in the functionality of LSP-jdtls. Pop-up windows take a long time to show up and elements of code remain underlined even though my mouse is no longer hovering over the same element. (In the picture below my mouse is hovering over '...abs...' in line 16. However, 'GaussianElimination' in line 5 is underlined)
    worksButIsBuggy

  3. Nothing works - As if I haven't installed LSP-jdtls in the first place. (Notice that in the picture below there is no 'jdtls' in the status bar)
    doesntWork

Which of the aforementioned behaviors I get seems completely chosen at random (even if I keep opening and closing the same file over and over again I get inconsistent experience).


Reproducing the problem. Do a clean install of Sublime Text 4 with 'factory settings' (or delete Sublime-Text in ~/.config folder). Then, install:

  1. Package Control
  2. LSP
  3. LSP-jdtls

Save a .java file on your Desktop (For example use java code at the end of the page: https://www.algorithm-archive.org/contents/gaussian_elimination/gaussian_elimination.html --- you may have to select Java from a list of all available programming languages in the top bar of the page).

Open the file you saved on your Desktop. Test the functionality of LSP-jdtls. Close the file and repeat this process as many times as you'd like.


Solution (workaround). Disconnecting from the internet before opening Sublime Text 4 completely solves the issue. LSP-jdtls works as it was supposed to. No more unpredictable behavior every time I open .java file. Moreover, the behavior of LSP-jdtls is smooth and no longer are elements of code underlined that are no longer hovered over.


Additional info. I am using Linux Mint 20.2 and running java --version in terminal gives:

openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)





This comment is a summary of a discussion between me and @rwols on August 1st, 2021 on Sublime Text Discord server.

@rchl
Copy link
Member

rchl commented Jul 28, 2022

Pinning is also useful because it allows you to review the changes done to the server when updating it and either add new settings, remove removed ones or address breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants