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

Eclipse completion sluggish/broken #405

Closed
2019-05-10 opened this issue Jan 21, 2020 · 15 comments
Closed

Eclipse completion sluggish/broken #405

2019-05-10 opened this issue Jan 21, 2020 · 15 comments
Milestone

Comments

@2019-05-10
Copy link

I recently upgraded to Eclipse 2019-12 with everything else.
Today I notice completion proposals being sluggish and constantly having as first "proposal"
Error while computing completion

$WORKSPACE/.metadata/.log/

shows the following:

!ENTRY org.eclipse.lsp4e 4 0 2020-01-21 15:20:06.279
!MESSAGE org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
!STACK 0
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
        at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
        at org.eclipse.lsp4e.operations.completion.LSContentAssistProcessor.computeCompletionProposals(LSContentAssistProcessor.java:96)
        at org.springframework.tooling.boot.ls.jdt.SpringBootJavaCompletionProposalComputer.lambda$0(SpringBootJavaCompletionProposalComputer.java:55)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
        at org.eclipse.lsp4e.LanguageServerWrapper.lambda$1(LanguageServerWrapper.java:244)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
        at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Eclipse IDE for Enterprise Java Developers.

Version: 2019-12 (4.14.0)
Build id: 20191212-1212

Spring Boot Language Server Feature 4.5.0.201912170939 org.springframework.tooling.boot.ls.feature.feature.group Pivotal, Inc.
Spring IDE Boot Microservices Dash 3.9.11.201912160804-RELEASE org.springframework.ide.eclipse.boot.dash.feature.feature.group Spring IDE Developers
Spring Tool Suite 4 Main Feature 4.5.0.201912171052-RELEASE org.springframework.boot.ide.main.feature.feature.group Pivotal, Inc.
Spring XML Namespace Support 3.9.11.201912160804-RELEASE org.springframework.ide.eclipse.xml.namespaces.feature.feature.group Pivotal, Inc.

@BoykoAlex
Copy link
Contributor

Looks like there is an error occurring on the Language Server process... what you've pasted above (the eclipse log) is the consequence of the error on the language server side.
Please go to Preferences -> Language Servers -> Spring Language Servers preference page and check-mark Spring Boot.
Either restart STS now or Close all editors and then open a Java file and invoke content assist.
One of the consoles in the Console view labeled Spring Boot Language Server n should have the log of the language server. Please copy paste the language server log here for us.

Besides the above ensure you're on the latest STS4 tooling in your Eclipse. Did you upgrade STS4 from this site: https://download.springsource.com/release/TOOLS/sts4/update/e4.14/ ?

@2019-05-10
Copy link
Author

2019-05-10 commented Jan 22, 2020

How do I restart STS manually?

I have both
https://download.springsource.com/release/TOOLS/sts4/update/e4.14
and
https://download.springsource.com/release/TOOLS/sts4/update/latest
enabled as update sites.

Edit:
BTW, it is not even a Spring/SpringBoot project, just plain Java/Maven.

@2019-05-10
Copy link
Author

Since it took a rather long time for the issue tom occur again, the log
a) is huge (~ 1000 lines)
b) contains info about several projects and my system, which I am not willing to share (apparently SpringProcessConnectorService tries to connect to everything java? And other parts of STS read projects that have no relation to STS at all? Seems rather intrusive.).

Here the most stacktrace

14:46:33.581 [Simple-Language-Server main thread] ERROR o.s.i.v.c.l.u.SimpleTextDocumentService - 
org.springframework.ide.vscode.commons.util.BadLocationException: null
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.fail(TreeLineTracker.java:1053)
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.getLineInformation(TreeLineTracker.java:1162)
	at org.springframework.ide.vscode.commons.util.text.linetracker.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:137)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.toOffset(TextDocument.java:206)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:82)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:92)
	at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$didChange$1(SimpleTextDocumentService.java:176)
	at org.springframework.ide.vscode.commons.util.AsyncRunner.lambda$execute$1(AsyncRunner.java:75)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)
	at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
14:46:34.343 [Simple-Language-Server main thread] ERROR o.s.i.v.c.l.u.SimpleTextDocumentService - 
org.springframework.ide.vscode.commons.util.BadLocationException: null
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.fail(TreeLineTracker.java:1053)
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.getLineInformation(TreeLineTracker.java:1162)
	at org.springframework.ide.vscode.commons.util.text.linetracker.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:137)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.toOffset(TextDocument.java:206)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:82)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:92)
	at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$didChange$1(SimpleTextDocumentService.java:176)
	at org.springframework.ide.vscode.commons.util.AsyncRunner.lambda$execute$1(AsyncRunner.java:75)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)
	at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
14:46:34.488 [Simple-Language-Server main thread] ERROR o.s.i.v.c.l.u.SimpleTextDocumentService - 
org.springframework.ide.vscode.commons.util.BadLocationException: null
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.fail(TreeLineTracker.java:1053)
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.getLineInformation(TreeLineTracker.java:1162)
	at org.springframework.ide.vscode.commons.util.text.linetracker.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:137)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.toOffset(TextDocument.java:206)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:82)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:92)
	at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$didChange$1(SimpleTextDocumentService.java:176)
	at org.springframework.ide.vscode.commons.util.AsyncRunner.lambda$execute$1(AsyncRunner.java:75)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)
	at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
14:46:34.768 [Simple-Language-Server main thread] ERROR o.s.i.v.c.l.u.SimpleTextDocumentService - 
org.springframework.ide.vscode.commons.util.BadLocationException: null
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.fail(TreeLineTracker.java:1053)
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.getLineInformation(TreeLineTracker.java:1162)
	at org.springframework.ide.vscode.commons.util.text.linetracker.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:137)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.toOffset(TextDocument.java:206)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:82)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:92)
	at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$didChange$1(SimpleTextDocumentService.java:176)
	at org.springframework.ide.vscode.commons.util.AsyncRunner.lambda$execute$1(AsyncRunner.java:75)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)
	at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
14:46:34.879 [Simple-Language-Server main thread] ERROR o.s.i.v.c.l.u.SimpleTextDocumentService - 
org.springframework.ide.vscode.commons.util.BadLocationException: null
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.fail(TreeLineTracker.java:1053)
	at org.springframework.ide.vscode.commons.util.text.linetracker.TreeLineTracker.getLineInformation(TreeLineTracker.java:1162)
	at org.springframework.ide.vscode.commons.util.text.linetracker.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:137)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.toOffset(TextDocument.java:206)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:82)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.apply(TextDocument.java:92)
	at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$didChange$1(SimpleTextDocumentService.java:176)
	at org.springframework.ide.vscode.commons.util.AsyncRunner.lambda$execute$1(AsyncRunner.java:75)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)
	at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)
	at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
14:46:35.064 [elastic-15] INFO  o.s.i.v.c.l.c.VscodeCompletionEngineAdapter - Starting completion handling
14:46:35.064 [elastic-15] ERROR o.e.lsp4j.jsonrpc.RemoteEndpoint - Internal error: org.springframework.ide.vscode.commons.util.BadLocationException
java.util.concurrent.CompletionException: org.springframework.ide.vscode.commons.util.BadLocationException
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:704)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
	at reactor.core.publisher.MonoToCompletableFuture.onError(MonoToCompletableFuture.java:68)
	at reactor.core.publisher.FluxMap$MapSubscriber.onError(FluxMap.java:126)
	at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.onError(MonoSubscribeOn.java:150)
	at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onError(MonoPeekTerminal.java:251)
	at reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.onError(FluxPeekFuseable.java:545)
	at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:65)
	at reactor.core.publisher.Mono.subscribe(Mono.java:4105)
	at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:124)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.ide.vscode.commons.util.BadLocationException: null
	at org.springframework.ide.vscode.commons.util.text.linetracker.ListLineTracker.getLineInformation(ListLineTracker.java:175)
	at org.springframework.ide.vscode.commons.util.text.linetracker.AbstractLineTracker.getLineInformation(AbstractLineTracker.java:137)
	at org.springframework.ide.vscode.commons.util.text.TextDocument.toOffset(TextDocument.java:206)
	at org.springframework.ide.vscode.commons.languageserver.completion.VscodeCompletionEngineAdapter.lambda$getCompletionsMono$0(VscodeCompletionEngineAdapter.java:144)
	at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:56)
	... 9 common frames omitted
14:46:35.065 [elastic-15] INFO  o.s.i.v.c.l.c.VscodeCompletionEngineAdapter - Completion handling terminated!

Let me know what else you may need so I can trim down the log file accordingly.

@BoykoAlex
Copy link
Contributor

BoykoAlex commented Jan 22, 2020

The log on the language server side seems to indicate that some text document got out of sync between language server process and eclipse... the language server somehow ended up with out-of-date version of the editor contents... The log doesn't reveal the reason for the above...
Close all editors in STS. Try to open only files for the non-Spring Java project you work with. The Spring Boot Language Server would start for it anyway. However, since it is not a Boot project CA should return 0 completions right away because java files from non-Spring projects aren't tracked by the language server. It'd be great to see when BadLocationException starts occurring...
Anyway to share your project with us? Or maybe try to reproduce it with simple Maven Java project?
Looks like it takes a while to reproduce the issue... Are there some specific steps for us to try to reproduce it on our end?

@2019-05-10
Copy link
Author

2019-05-10 commented Jan 24, 2020

Attached an anonymized log. Project I was working with is called "pdfbox-test".
Project has been created with Eclipse's "New project -> New Maven project" wizard, simple, no archetypes.
.project, classpath, .settings/*, pom.xml attached as well.

files.zip

The first "proposal"
Error while computing completion
doesn't appear anymore, but that's most likely due to the project not being a SpingBoot project -- nevertheless, the server runs and acts on every action. I don't think it should do that with non-springboot project.

Given the amount of time it took (yesterday and today!) to get even that log, it's not possible to create another project just for that.
As for steps ... since I don't even know what happens, I don't know what triggers that.
Seems to be related to time or activity. The more/longer the editor is worked on, the probability of the error seems to increase.

@kdvolder
Copy link
Member

I don't think it should do that with non-springboot project.

I don't think there's really a way to avoid it. The lsp4e language server framework activates the language server based on type of file. So basically, if you want to provide functionality in .java files then the language server is activated for any .java file.

@BoykoAlex
Copy link
Contributor

@2019-05-10 The project is missing source folders and their content... I think when you export the project to archive you need to explicitly select folders to be included in the archive. We'd need the project with the source

@2019-05-10
Copy link
Author

The code was left out intentionally.
Since it takes a long time for the error to occur, I cannot afford to spend time on coding just to trigger that error, but need to be productive. Hence, the code is work-related.

But it's plain Java based on
https://github.com/dhorions/boxable
and
https://pdfbox.apache.org/2.0/

@kdvolder
Copy link
Member

@2019-05-10 We understand. Unfortunately we also have to be productive and spending time on a typically futile effort to fix something we have no way of reproducing is not very productive. So this ticket will probably just remain sitting open without much progress / work on it until we stumble on the problem ourselves or someone else runs into it also and provide some way we can reproduce it.

@kdvolder
Copy link
Member

BTW: It sounds like a nasty problem for which a reliable method of reproduction will indeed be hard to provide. Even if you were to provide your work related code, I don't think it will necessary lead to being able to therefore reproduce this issue (as you say it typically takes a long time, and it is hard to guess at what specific action may have caused it). So I think we are a bit caught between the proverbial "rock and hard-place".

@BoykoAlex
Copy link
Contributor

@2019-05-10 Try attaching a VisualVM profiler snapshot for us :-)
See these instructions: #282 (comment)

@martinlippert
Copy link
Member

@2019-05-10 First of all, thank you very much for reporting this and spending time trying to help us to reproduce the issue. As we can see it is sometimes hard to reproduce such issues and sometimes difficult to find the root cause of those issues. Nevertheless, I would like to dig a bit deeper here to see how we can find that issue and solve it for the future. I also understand that you cannot spend a lot of time to create artificial random projects to reproduce the issue and it is even not clear if that is possible at all for this issue. Therefore I find the comment from Kris above about productivity a bit misleading and would like to apologize for that. We provide the tools that you (hopefully) like to use to be productive and I understand it as part of our work to make you productive - not the other way around.

With regards to the "intrusive" activation of the Spring Boot tooling for all Java projects, this is indeed true and partly caused by the underlying architecture. The Spring Boot language server (the one that provides most of the Spring related functionality) is build in an IDE-agnostic way. It gets invoked by the IDE without the IDE really knowing a lot about it. So it is registered for all source files of type "Java" (for example). The language server itself then decides whether to do anything with that file or not. We could insert some specific logic to determine whether it is a Spring project or not, but the question would remain where to use that logic (inside the IDE or the language server). Anyhow, don't want to bother you with too many details, just trying to explain why the language server is activated for all Java projects/files instead of only Spring-related ones.

The ultimate goal for us is definitely to make the language server as reliable and performant as possible, to that it doesn't really make a difference whether it is used for every Java project or not. Maybe we should re-think that, but it would also mean to multiply the numbers of different implementations for that logic, since it would reside on the IDE, which could be Eclipse, VSCode, Theia, or something else.

With regards to your concrete issue, you could disable the Spring Boot Language Server for Java files via the preferences for the Language Servers in your IDE. But that would also mean to loose a big part of the Spring Tools functionality. But maybe this is a good temporary workaround when you hit the issue.

In addition to that we should make sure that even if such a problem occurs, the IDE doesn't get sluggish. For that, the stack trace that you provided should already help. It doesn't really explain why the language server ended up in that place, but at least it should not turn the IDE sluggish in case that happens, but fail faster and more gracefully. I will add that to our issues to tackle.

If you observe anything special with regards to this issue or come across any further details and/or ideas that might be related, please comment. Your input is always welcome and appreciated.

@martinlippert martinlippert added this to the 4.6.0.RELEASE milestone Feb 19, 2020
@martinlippert
Copy link
Member

We identified a major issue with might be related to the observations in this issue item. Feel free to download the latest nightly CI build and give it a try: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html. Would be interesting to hear from you whether our fix improves the situation for you, too.

@martinlippert
Copy link
Member

We implemented a bunch of improvements to avoid any damage to the general Java editing experience, so I think this item can be closed now. Feel free to grab one of the latest nightly downloads to verify and report back. Would be great to hear your feedback from using those latest nightly builds: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html

The release containing these improvements is scheduled for late May.

@martinlippert
Copy link
Member

We also found a major issue that could cause the BadLocationException to be thrown on the language server side and fixed that. The fix will be part to the 4.7.1 release, scheduled for late July/early August.

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

No branches or pull requests

4 participants