eclipselabs/eclipse-language-service

TimeoutException for CSS code completion

Closed this issue · 14 comments

Every attempt to use completion with CSS language server ends with timeout. I tried to increase timeout (30 sec) but result was the same. I think its related to very large response from CSS LS. After timeout whole JSON response is displayed in log and in console output.

I can get completion for the color in

a {
  color: <complete here>
}

with master and vscode 1.7.1/02611b40b24c9df2726ad8b33f5ef5f67ac30b44 .
Can you try it?

I tried completion for properties and for values, always timeout. I'm using master and the same version of vscode.

Which OS? I'm on Fedora 24.

Sorry, completion for values is working as you said. Problem is visible with properties.

Which OS? I'm on Fedora 24.

hehe I'm also using Fedora 24. With LSP4J master.

It looks that there is some kind of hardcoded limitation in Console processing. CSS respose with code completion items is larger than 160000 and IOConsolePartitioner[1] is waiting and blocking other IStreamListener.

[1] https://github.com/eclipse/eclipse.platform.debug/blob/master/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java#L477

OK, that's a great hint you've found! Ideally we need to move away from having console stream by default. This is useful for dev/debug, but users won't like it. IIRC, I did enable it because it was the 1st working state I could reach, but it's not something we care enough and I'm fine if we drop it to solve this bug.

Nice to hear that you don't plan to stick with launch configurations. As you said launch configurations are good for now but I believe that future versions should work with pure process. I think I will fix this issue by providing extension point from #96

I'd like to stick with Launch Configurations for Servers who's lifecycle should be orchestrated by the IDE (Basically if the IDE should start/stop the process). But we definitely need to consider other kinds of servers, that won't be orchestrated by the tool.
Looking at the code, the 'StreamProvider" is simply the interface we need. The Launch Configuration are the most helpful way for user-controllable stuff (if user wants to manually add a new server without a plugin, or tweak a content-type/server associations). But plugin providers should be given a way to define servers without showing it to users as Launch Configuration. That's indeed the topic of #96

I don't feel comfortable with launch configurations for one reason. Regular user should not see things related to language server internals. Shouldn't be able to shutdown language server manually or delete launch configurations. This will bring a lot of complexity and problems. This is in general Eclipse problem, to much things to control for user ;) Of course everything is a matter of discussion.

We can use launch configurations without making them visible for the user. That way, they can be provided by third-party plugins. If manual configuration is needed, we can provide a restricted UI, so that users don't get overwhelmed by the many options.

We can use launch configurations without making them visible for the user

If its possible then maybe its a good idea but still we need to overcome console message size limitation.

@vladdu Can you point me to any example how make such 'custom' launch configurations (I'm not very familiar with launch configurations API).

@mniewrzal I can't check right now if that is all that is needed, but the ILaunchConfiguration.launch method that has a "register" parameter. By setting it to false, the launch is not visible in the UI. See
http://help.eclipse.org/neon/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/debug/core/ILaunchConfiguration.html#launch-java.lang.String-org.eclipse.core.runtime.IProgressMonitor-boolean-boolean-

Thanks! I also found attribute ILaunchManager.ATTR_PRIVATE to hide launch configuration from UI. Now I'm trying to not use Console view to display communication.

I don't really know what to do with this issue. Now that there is an extension to define language server, I don't believe we have to focus much on the Run Configuration console story.
I'm closing this issue as it, but feel free to open bugs (at bugs.eclipse.org ) if there is still something you'd like to see changed here.