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

Issues with Language Servers #3127

Closed
cdietrich opened this issue Nov 19, 2016 · 8 comments
Closed

Issues with Language Servers #3127

cdietrich opened this issue Nov 19, 2016 · 8 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. sprint/next status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Milestone

Comments

@cdietrich
Copy link

cdietrich commented Nov 19, 2016

I am experimenting with Language Servers in Che (implemented with Xtext) and I came over following issues:

  • The Client Misses to send the languageId to the Server in didOpen requests (as a temp solution i patched che to hardcode the id)
  • If i use Content Assist the Calculated Offsets and Lines seem wrong thus Xtext answers with errors

Reproduction Steps:

Expected behavior:

everything works

Actual Behaviour

validation works (* after patching che), content assist not

content assist is not working

  • have a look at xxx-* log to see the errors xtext sends
"message": "java.lang.IndexOutOfBoundsException: Position [\n line \u003d 2\n character \u003d 20\n] text was : Hello
name!\nHello Yyyyy from name!\nHello xxxx from \n\n"
  • before i patched che regarding language id i got following error from xtext
Nov 18, 2016 8:02:12 PM org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError                                      
SEVERE: The property 'languageId' must have a non-null value.                                                               
org.eclipse.lsp4j.jsonrpc.json.InvalidMessageException: The property 'languageId' must have a non-null value.               
        at org.eclipse.lsp4j.jsonrpc.validation.ReflectiveMessageValidator.consume(ReflectiveMessageValidator.java:41)      
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:149)               
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:77)                       
        at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:68)                
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)                                          
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)                                                         
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)                                  
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)                                  
        at java.lang.Thread.run(Thread.java:745)

i am not sure what the state of the clientside impl is and if this is expected to work and if i miss a configuraton regarding the languageId (besides confuguring it in the module and adding the module to the war)

is there a easy possibility to debug this client side?

@tolusha
Copy link
Contributor

tolusha commented Nov 21, 2016

@evidolob
Could you have a look pls

@tolusha tolusha added the kind/question Questions that haven't been identified as being feature requests or bugs. label Nov 21, 2016
@evidolob evidolob added kind/bug Outline of a bug - must adhere to the bug report template. team/ide and removed kind/question Questions that haven't been identified as being feature requests or bugs. labels Nov 21, 2016
@evidolob
Copy link
Contributor

About languageId it's a bug. About Content Assist I need more time to investigate.

@cdietrich
Copy link
Author

cdietrich commented Nov 21, 2016

with completion i see other problems as well (incomplete messages in xtexts log, i dont know if this is related how i added to logging to xtext) but the very same server works fine in vscode

@cdietrich
Copy link
Author

@evidolob is there an option to enable message logging on che side?

@cdietrich
Copy link
Author

it looks like the client does not send didchanges when selecting from content assist

@cdietrich
Copy link
Author

hmmm

if i type "H" in an empty document, then vscode sends

 "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 0,
                    "character": 0
                },
                "end": {
                    "line": 0,
                    "character": 0
                }
            },
            "rangeLength": 0,
            "text": "H"
        }
    ]

and che sends

"contentChanges": [                                                                  
      {                                                                                  
        "range": {                                                                       
          "start": {                                                                     
            "line": 0,                                                                   
            "character": 0                                                               
          },                                                                             
          "end": {                                                                       
            "line": 0,                                                                   
            "character": 1                                                               
          }                                                                              
        },                                                                               
        "text": "H"    

@cdietrich
Copy link
Author

if i fix this and use the same start and end positions for insertions it works fine

@evidolob evidolob added the status/in-progress This issue has been taken by an engineer and is under active development. label Dec 6, 2016
evidolob pushed a commit that referenced this issue Dec 7, 2016
…ntal synchronize

Signed-off-by: Evgen Vidolob <evidolob@codenvy.com>
@evidolob evidolob added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. and removed status/in-progress This issue has been taken by an engineer and is under active development. labels Dec 7, 2016
evidolob pushed a commit that referenced this issue Dec 9, 2016
…ntal synchronize (#3305)

Signed-off-by: Evgen Vidolob <evidolob@codenvy.com>
@evidolob evidolob closed this as completed Dec 9, 2016
@cdietrich
Copy link
Author

looks good. thx

@bmicklea bmicklea mentioned this issue Jan 13, 2017
70 tasks
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
… in incremental synchronize (eclipse-che#3305)

Signed-off-by: Evgen Vidolob <evidolob@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. sprint/next status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Projects
None yet
Development

No branches or pull requests

5 participants