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

Preferences to enable/disable symbol provider #413

Closed
angelozerr opened this issue Jun 4, 2019 · 0 comments · Fixed by #414
Closed

Preferences to enable/disable symbol provider #413

angelozerr opened this issue Jun 4, 2019 · 0 comments · Fixed by #414
Assignees
Labels
Milestone

Comments

@angelozerr
Copy link
Contributor

With large file like nasa.xml, the vscode outline doesn't work. It seems lsp4j doesn't support a big symbol provider:

[Trace - 17:48:08] Received response 'textDocument/documentSymbol - (1)' in 6234ms. Request failed: Internal error. (-32603).
[Error - 17:48:08] Request textDocument/documentSymbol failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:300)
	at java.lang.StringCoding.encode(StringCoding.java:344)
	at java.lang.String.getBytes(String.java:918)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:60)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint$$Lambda$17/1028064261.accept(Unknown Source)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

To fix this problem, we need to provide a preferences to enable/disable symbol provider.

In the future we could provide a new preferences to set the number of symbol returned by the symbol provider. I started to do that in https://github.com/angelozerr/lsp4xml/blob/7bca4bf80031cbcd522eaf41f3ba217ceb942bfb/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/services/XMLSymbolsProvider.java#L67

@angelozerr angelozerr added this to the v0.7.0 milestone Jun 4, 2019
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 4, 2019
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 4, 2019
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 4, 2019
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Jun 4, 2019
fbricon pushed a commit that referenced this issue Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants