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

lsp-java + semgrep-ls - slow completion #4518

Open
2 of 3 tasks
AnonymusBadger opened this issue Jul 31, 2024 · 0 comments
Open
2 of 3 tasks

lsp-java + semgrep-ls - slow completion #4518

AnonymusBadger opened this issue Jul 31, 2024 · 0 comments
Labels

Comments

@AnonymusBadger
Copy link

AnonymusBadger commented Jul 31, 2024

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

Emacs hangs for few seconds then

lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘java.completion.onDidSelect’ failed.

(error "Timeout while waiting for response.  Method: workspace/executeCommand")

is logged in *Messeges* buffer and

[1371.13][ERROR]: Command java.completion.onDidSelect not supported by the server

in *semgrep-ls::stderr* buffer.

The issue is caused by semgrep-ls. If semgrep is not present in $PATH and thus not started then completion works quickly and fine.

Steps to reproduce

  1. Enable (java +lsp +tree-sitter) module in Doom Emacs.
  2. Install semgrep on the system (pip install --user semgrep in my case)
  3. Open any Java file
  4. Select completion from the list and hit enter

Expected behavior

Completion works as well as it did without semgrep while still providing semgrep static analysis info.

Which Language Server did you use?

lsp-java, semgrep-ls

OS

Linux

Error callstack

*lsp-log: semgrep-ls*

[Trace - 02:49:37 AM] Sending request 'textDocument/codeAction - (66)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 0
    },
    "end": {
      "line": 11,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:37 AM] Received response 'textDocument/codeAction - (66)' in 11ms.
Result: []


[Trace - 02:49:40 AM] Sending request 'textDocument/codeAction - (67)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 0
    },
    "end": {
      "line": 11,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:40 AM] Received response 'textDocument/codeAction - (67)' in 10ms.
Result: []


[Trace - 02:49:41 AM] Sending request 'textDocument/codeAction - (68)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 10,
      "character": 0
    },
    "end": {
      "line": 10,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:41 AM] Received response 'textDocument/codeAction - (68)' in 13ms.
Result: []


[Trace - 02:49:41 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 1
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 47
        },
        "end": {
          "line": 10,
          "character": 47
        }
      },
      "rangeLength": 0,
      "text": "\n"
    }
  ]
}


[Trace - 02:49:41 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 2
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 0
        },
        "end": {
          "line": 11,
          "character": 0
        }
      },
      "rangeLength": 0,
      "text": "          "
    }
  ]
}


[Trace - 02:49:42 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 3
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "S"
    }
  ]
}


[Trace - 02:49:42 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 4
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 11
        },
        "end": {
          "line": 11,
          "character": 11
        }
      },
      "rangeLength": 0,
      "text": "t"
    }
  ]
}


[Trace - 02:49:43 AM] Sending request 'textDocument/codeAction - (73)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 12
    },
    "end": {
      "line": 11,
      "character": 12
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:43 AM] Sending request 'textDocument/semanticTokens/full - (74)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:49:43 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 74
}


[Trace - 02:49:43 AM] Sending request 'textDocument/semanticTokens/full - (75)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:49:43 AM] Sending request 'textDocument/hover - (76)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 12
  }
}


[Trace - 02:49:43 AM] Received response 'textDocument/codeAction - (73)' in 93ms.
Result: []


[Trace - 02:49:43 AM] Received response 'textDocument/hover - (76)' in 16ms.
Result: null


[Trace - 02:49:43 AM] Sending request 'textDocument/codeAction - (79)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 12
    },
    "end": {
      "line": 11,
      "character": 12
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:43 AM] Received response 'textDocument/codeAction - (79)' in 2ms.
Result: []


[Trace - 02:49:45 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 5
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 0
        },
        "end": {
          "line": 12,
          "character": 0
        }
      },
      "rangeLength": 13,
      "text": ""
    }
  ]
}


[Trace - 02:49:46 AM] Sending notification 'textDocument/didSave'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 5
  }
}


[Trace - 02:49:46 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "diagnostics": [
    {
      "code": "java.lang.security.audit.crypto.unencrypted-socket.unencrypted-socket",
      "codeDescription": {
        "href": "https:sg.run/W8zA"
      },
      "message": "Detected use of a Java socket that is not encrypted. As a result, the traffic could be read by an attacker intercepting the network traffic. Use an SSLSocket created by 'SSLSocketFactory' or 'SSLServerSocketFactory' instead.",
      "range": {
        "end": {
          "character": 53,
          "line": 8
        },
        "start": {
          "character": 31,
          "line": 8
        }
      },
      "severity": 2,
      "source": "Semgrep"
    }
  ],
  "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
}


[Trace - 02:49:47 AM] Sending request 'textDocument/semanticTokens/full - (82)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:49:48 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 6
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 47
        },
        "end": {
          "line": 10,
          "character": 47
        }
      },
      "rangeLength": 0,
      "text": "\n"
    }
  ]
}


[Trace - 02:49:48 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 7
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 0
        },
        "end": {
          "line": 11,
          "character": 0
        }
      },
      "rangeLength": 0,
      "text": "          "
    }
  ]
}


[Trace - 02:49:48 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 8
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "S"
    }
  ]
}


[Trace - 02:49:49 AM] Sending request 'textDocument/codeAction - (86)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 11
    },
    "end": {
      "line": 11,
      "character": 11
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:49 AM] Sending request 'textDocument/semanticTokens/full - (87)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:49:49 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 87
}


[Trace - 02:49:49 AM] Sending request 'textDocument/semanticTokens/full - (88)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:49:49 AM] Sending request 'textDocument/hover - (89)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 11
  }
}


[Trace - 02:49:50 AM] Received response 'textDocument/codeAction - (86)' in 152ms.
Result: []


[Trace - 02:49:50 AM] Received response 'textDocument/hover - (89)' in 143ms.
Result: null


[Trace - 02:49:50 AM] Sending request 'textDocument/codeAction - (91)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 10
    },
    "end": {
      "line": 11,
      "character": 10
    }
  },
  "context": {
    "diagnostics": [
      {
        "range": {
          "start": {
            "line": 11,
            "character": 10
          },
          "end": {
            "line": 11,
            "character": 11
          }
        },
        "severity": 1,
        "code": "16777218",
        "source": "Java",
        "message": "S cannot be resolved to a type",
        "data": [
          "S"
        ]
      }
    ]
  }
}


[Trace - 02:49:50 AM] Sending request 'textDocument/hover - (93)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 10
  }
}


[Trace - 02:49:50 AM] Sending request 'textDocument/hover - (94)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 10
  }
}


[Trace - 02:49:50 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 94
}


[Trace - 02:49:50 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 93
}


[Trace - 02:49:50 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 91
}


[Trace - 02:49:50 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 9
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 0
        },
        "end": {
          "line": 12,
          "character": 0
        }
      },
      "rangeLength": 12,
      "text": ""
    }
  ]
}


[Trace - 02:49:50 AM] Received response 'nil - (91)' in 0ms.
Result: []


[Trace - 02:49:50 AM] Received response 'nil - (93)' in 0ms.
Result: null


[Trace - 02:49:50 AM] Received response 'nil - (94)' in 0ms.
Result: null


[Trace - 02:49:52 AM] Sending request 'textDocument/semanticTokens/full - (95)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:49:58 AM] Sending notification 'textDocument/didOpen'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "languageId": "java",
    "version": 9,
    "text": "package com.anonymousbadger.HttpServer;\n\nimport java.net.ServerSocket;\nimport java.net.Socket;\n\nclass HttpServer {\n  public static void main(String[] args) throws Exception {\n    Integer port = 8000;\n    try (ServerSocket socket = new ServerSocket(port)) {\n      while (true) {\n        try (Socket client = socket.accept()) {\n          System.out.println(client.toString());\n        }\n      }\n    }\n  }\n}\n"
  }
}


[Trace - 02:49:58 AM] Sending request 'textDocument/codeAction - (99)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 10
    },
    "end": {
      "line": 11,
      "character": 10
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:58 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "diagnostics": [
    {
      "code": "java.lang.security.audit.crypto.unencrypted-socket.unencrypted-socket",
      "codeDescription": {
        "href": "https:sg.run/W8zA"
      },
      "message": "Detected use of a Java socket that is not encrypted. As a result, the traffic could be read by an attacker intercepting the network traffic. Use an SSLSocket created by 'SSLSocketFactory' or 'SSLServerSocketFactory' instead.",
      "range": {
        "end": {
          "character": 53,
          "line": 8
        },
        "start": {
          "character": 31,
          "line": 8
        }
      },
      "severity": 2,
      "source": "Semgrep"
    }
  ],
  "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
}


[Trace - 02:49:58 AM] Received response 'textDocument/codeAction - (99)' in 18ms.
Result: []


[Trace - 02:49:59 AM] Sending request 'textDocument/codeAction - (100)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 10
    },
    "end": {
      "line": 11,
      "character": 10
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:49:59 AM] Sending request 'textDocument/hover - (101)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 10
  }
}


[Trace - 02:49:59 AM] Received response 'textDocument/codeAction - (100)' in 19ms.
Result: []


[Trace - 02:49:59 AM] Received response 'textDocument/hover - (101)' in 19ms.
Result: null


[Trace - 02:49:59 AM] Sending request 'textDocument/hover - (102)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 10
  }
}


[Trace - 02:49:59 AM] Received response 'textDocument/hover - (102)' in 9ms.
Result: null


[Trace - 02:50:01 AM] Sending request 'textDocument/semanticTokens/full - (103)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:01 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 103
}


[Trace - 02:50:01 AM] Sending request 'textDocument/semanticTokens/full - (105)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:01 AM] Sending request 'textDocument/codeAction - (108)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 10
    },
    "end": {
      "line": 11,
      "character": 10
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:01 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 108
}


[Trace - 02:50:01 AM] Sending request 'textDocument/codeAction - (111)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 10
    },
    "end": {
      "line": 11,
      "character": 10
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:01 AM] Received response 'nil - (108)' in 0ms.
Result: []


[Trace - 02:50:01 AM] Received response 'textDocument/codeAction - (111)' in 57ms.
Result: []


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (114)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (117)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (120)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (123)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (126)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (129)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (132)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (135)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (138)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (141)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (144)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (147)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (150)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (153)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (156)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:02 AM] Sending request 'textDocument/semanticTokens/full - (159)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:03 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 10
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 47
        },
        "end": {
          "line": 10,
          "character": 47
        }
      },
      "rangeLength": 0,
      "text": "\n"
    }
  ]
}


[Trace - 02:50:03 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 11
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 0
        },
        "end": {
          "line": 11,
          "character": 0
        }
      },
      "rangeLength": 0,
      "text": "          "
    }
  ]
}


[Trace - 02:50:04 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 12
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "S"
    }
  ]
}


[Trace - 02:50:05 AM] Sending request 'textDocument/codeAction - (163)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 11
    },
    "end": {
      "line": 11,
      "character": 11
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:05 AM] Sending request 'textDocument/semanticTokens/full - (164)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:05 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 164
}


[Trace - 02:50:05 AM] Sending request 'textDocument/semanticTokens/full - (165)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:05 AM] Received response 'textDocument/codeAction - (163)' in 28ms.
Result: []


[Trace - 02:50:06 AM] Sending request 'textDocument/hover - (168)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 11
  }
}


[Trace - 02:50:06 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 168
}


[Trace - 02:50:06 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 165
}


[Trace - 02:50:06 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 13
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 11
        },
        "end": {
          "line": 11,
          "character": 11
        }
      },
      "rangeLength": 0,
      "text": "t"
    }
  ]
}


[Trace - 02:50:06 AM] Received response 'nil - (168)' in 0ms.
Result: null


[Trace - 02:50:08 AM] Sending request 'textDocument/codeAction - (171)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 12
    },
    "end": {
      "line": 11,
      "character": 12
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:08 AM] Sending request 'textDocument/semanticTokens/full - (172)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:08 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 172
}


[Trace - 02:50:08 AM] Sending request 'textDocument/semanticTokens/full - (173)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:08 AM] Sending request 'textDocument/hover - (174)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 12
  }
}


[Trace - 02:50:08 AM] Received response 'textDocument/codeAction - (171)' in 29ms.
Result: []


[Trace - 02:50:08 AM] Received response 'textDocument/hover - (174)' in 21ms.
Result: null


[Trace - 02:50:08 AM] Sending request 'textDocument/codeAction - (177)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 12
    },
    "end": {
      "line": 11,
      "character": 12
    }
  },
  "context": {
    "diagnostics": [
      {
        "range": {
          "start": {
            "line": 11,
            "character": 10
          },
          "end": {
            "line": 11,
            "character": 12
          }
        },
        "severity": 1,
        "code": "16777218",
        "source": "Java",
        "message": "St cannot be resolved to a type",
        "data": [
          "St"
        ]
      }
    ]
  }
}


[Trace - 02:50:08 AM] Received response 'textDocument/codeAction - (177)' in 12ms.
Result: []


[Trace - 02:50:08 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 173
}


[Trace - 02:50:08 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 14
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 12
        },
        "end": {
          "line": 11,
          "character": 12
        }
      },
      "rangeLength": 0,
      "text": "r"
    }
  ]
}


[Trace - 02:50:08 AM] Sending request 'textDocument/codeAction - (181)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 13
    },
    "end": {
      "line": 11,
      "character": 13
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:08 AM] Sending request 'textDocument/semanticTokens/full - (182)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:08 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 182
}


[Trace - 02:50:08 AM] Sending request 'textDocument/semanticTokens/full - (183)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:08 AM] Received response 'textDocument/codeAction - (181)' in 43ms.
Result: []


[Trace - 02:50:09 AM] Sending request 'textDocument/codeAction - (185)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 13
    },
    "end": {
      "line": 11,
      "character": 13
    }
  },
  "context": {
    "diagnostics": [
      {
        "range": {
          "start": {
            "line": 11,
            "character": 10
          },
          "end": {
            "line": 11,
            "character": 13
          }
        },
        "severity": 1,
        "code": "16777218",
        "source": "Java",
        "message": "Str cannot be resolved to a type",
        "data": [
          "Str"
        ]
      }
    ]
  }
}


[Trace - 02:50:09 AM] Received response 'textDocument/codeAction - (185)' in 12ms.
Result: []


[Trace - 02:50:09 AM] Sending request 'textDocument/hover - (186)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 13
  }
}


[Trace - 02:50:09 AM] Received response 'textDocument/hover - (186)' in 13ms.
Result: null


[Trace - 02:50:09 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 15
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 13
        },
        "end": {
          "line": 11,
          "character": 13
        }
      },
      "rangeLength": 0,
      "text": "i"
    }
  ]
}


[Trace - 02:50:09 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 16
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 14
        },
        "end": {
          "line": 11,
          "character": 14
        }
      },
      "rangeLength": 0,
      "text": "n"
    }
  ]
}


[Trace - 02:50:10 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 17
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 15
        },
        "end": {
          "line": 11,
          "character": 15
        }
      },
      "rangeLength": 0,
      "text": "g"
    }
  ]
}


[Trace - 02:50:10 AM] Sending request 'textDocument/codeAction - (188)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 16
    },
    "end": {
      "line": 11,
      "character": 16
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:10 AM] Sending request 'textDocument/semanticTokens/full - (189)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:10 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 189
}


[Trace - 02:50:10 AM] Sending request 'textDocument/semanticTokens/full - (190)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:10 AM] Received response 'textDocument/codeAction - (188)' in 19ms.
Result: []


[Trace - 02:50:11 AM] Sending request 'textDocument/hover - (192)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 16
  }
}


[Trace - 02:50:11 AM] Received response 'textDocument/hover - (192)' in 10ms.
Result: null


[Trace - 02:50:11 AM] Sending request 'textDocument/codeAction - (194)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 16
    },
    "end": {
      "line": 11,
      "character": 16
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:11 AM] Received response 'textDocument/codeAction - (194)' in 1ms.
Result: []


[Trace - 02:50:11 AM] Sending request 'textDocument/hover - (195)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 16
  }
}


[Trace - 02:50:11 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 195
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 18
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 16
        },
        "end": {
          "line": 11,
          "character": 16
        }
      },
      "rangeLength": 0,
      "text": " - java.lang"
    }
  ]
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 19
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 28
        }
      },
      "rangeLength": 18,
      "text": ""
    }
  ]
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 20
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "Str"
    }
  ]
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 21
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 13
        }
      },
      "rangeLength": 3,
      "text": ""
    }
  ]
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 22
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "String"
    }
  ]
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 23
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 16
        }
      },
      "rangeLength": 6,
      "text": ""
    }
  ]
}


[Trace - 02:50:11 AM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java",
    "version": 24
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 11,
          "character": 10
        },
        "end": {
          "line": 11,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "String"
    }
  ]
}


[Trace - 02:50:11 AM] Sending request 'workspace/executeCommand - (196)'.
Params: {
  "command": "java.completion.onDidSelect",
  "arguments": [
    "8",
    "5"
  ]
}


[Trace - 02:50:11 AM] Received response 'nil - (195)' in 0ms.
Result: null


[Trace - 02:50:22 AM] Sending request 'textDocument/codeAction - (198)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 16
    },
    "end": {
      "line": 11,
      "character": 16
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:22 AM] Sending request 'textDocument/semanticTokens/full - (199)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:22 AM] Sending notification '$/cancelRequest'.
Params: {
  "id": 199
}


[Trace - 02:50:22 AM] Sending request 'textDocument/semanticTokens/full - (200)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  }
}


[Trace - 02:50:22 AM] Received response 'textDocument/codeAction - (198)' in 23ms.
Result: []


[Trace - 02:50:28 AM] Sending request 'textDocument/hover - (202)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "position": {
    "line": 11,
    "character": 15
  }
}


[Trace - 02:50:28 AM] Sending request 'textDocument/codeAction - (203)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/Documents/Code/sandbox/Java/Test/app/src/main/java/com/anonymousbadger/HttpServer/HttpServer.java"
  },
  "range": {
    "start": {
      "line": 11,
      "character": 15
    },
    "end": {
      "line": 11,
      "character": 15
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 02:50:28 AM] Received response 'textDocument/hover - (202)' in 21ms.
Result: null


[Trace - 02:50:28 AM] Received response 'textDocument/codeAction - (203)' in 19ms.
Result: []

Anything else?

Logs are from gradle project but the same thing happens in any Java file.
M-x lsp-start-plain does not seem to start lsp-java only semgrep-ls and I cannot run lsp-install-server when semgrep is present (throws errors).
Tried in another PHP project with iph and semgrep-ls and completion worked just fine!

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

No branches or pull requests

1 participant