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

[Bug] Server parses slash as directory delimiter on WSL Linux #6

Open
KagaJiankui opened this issue Mar 8, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@KagaJiankui
Copy link

Using the language server on VSCode 1.87.1 on Ubuntu Linux x64 6.5.0-21-generic with VSCode glspc extension emits following error message:

Failed to handle request 2 textDocument/hover HoverParams(text_document=TextDocumentIdentifier(uri='file:///home/lexington/OS/kernel_legacy/Makefile'), position=37:12, work_done_token=None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/pygls/protocol/json_rpc.py", line 266, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "/usr/local/lib/python3.10/dist-packages/pygls/protocol/json_rpc.py", line 188, in _execute_request
    self._send_response(msg_id, handler(params))
  File "/usr/local/lib/python3.10/dist-packages/make_language_server/server.py", line 145, in hover
    for uni in DefinitionFinder(uni.node).find_all(
  File "/usr/local/lib/python3.10/dist-packages/lsp_tree_sitter/__init__.py", line 410, in find_all
    _uri = self.move_cursor(uri, cursor, True)
  File "/usr/local/lib/python3.10/dist-packages/lsp_tree_sitter/__init__.py", line 324, in move_cursor
    tree = self.uri2tree(uri)
  File "/usr/local/lib/python3.10/dist-packages/lsp_tree_sitter/__init__.py", line 284, in uri2tree
    with open(path, "rb") as f:
IsADirectoryError: [Errno 21] Is a directory: '/'
[Error - 11:43:33] Request textDocument/hover failed.
  Message: IsADirectoryError: [Errno 21] Is a directory: '/'
  Code: -32603 
[object Object]

the file causing this error is provided with this attachment: Makefile_errornous.txt. The SLASH variable in this makefile is suspicious to the emitted errors.

@Freed-Wu Freed-Wu self-assigned this Mar 8, 2024
@Freed-Wu Freed-Wu added the bug Something isn't working label Mar 8, 2024
@KagaJiankui KagaJiankui changed the title [Bug] [Bug] Server parses slash as directory delimiter on WSL Linux Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants