vls icon indicating copy to clipboard operation
vls copied to clipboard

Language server fails on startup.

Open peterlerche opened this issue 2 years ago • 0 comments

System Information

V doctor

OS: linux, "EndeavourOS Linux"
Processor: 8 cpus, 64bit, little endian, 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
CC version: cc (GCC) 12.2.0

getwd: /home/peterl
vmodules: /home/peterl/.vmodules
vroot: /usr/lib/vlang
vexe: /usr/lib/vlang/v
vexe mtime: 2022-09-02 15:56:31
is vroot writable: false
is vmodules writable: true
V full version: V 0.3.1 f2f6ea5

Git version: git version 2.37.3
Git vroot status: Error: fatal: not a git repository (or any of the parent directories): .git
.git/config present: false
thirdparty/tcc status: thirdparty-linux-amd64 827f7452-dirty

VLS info

vls version: 0.0.1.93767cb
vls server arguments: --child --socket --port 5008 --timeout 15

Problem Description

The VLS will install but breaks on language server startup. I have tried the following but ended up with the same fault.
A. Install via VSCode dialog box "VLS is not installed. Do you want to install it now?", V files open in the editor.
B. Install via VSCode dialog box "VLS is not installed. Do you want to install it now?", No V files open.
C. Install via v ls --install with and without open V files in the editor.

Fresh installations were made after deleting ~/.vls folder.
Restarting the language server does not help. The server failed immediately after startup.

Expected Output

That it is working.

Actual Output

================ V panic ================
   module: builtin
 function: get()
  message: array.get: index out of range (i == 0, a.len == 0)
     file: /home/runner/work/vls/vls/vlib/builtin/array.v:384
   v hash: 728b198
=========================================
libbacktrace: /home/peterl/.vls/bin/vls_linux_x64: 7ff3b7b8f207
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information
libbacktrace: failed to read executable information

Steps to Reproduce

Last Recorded LSP Requests

Request

[2022-09-06 18:53:43] {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":163666,"clientInfo":{"name":"Visual Studio Code","version":"1.71.0"},"locale":"en-us","rootPath":"/home/peterl/Projects/extract-website-text-content","rootUri":"file:///home/peterl/Projects/extract-website-text-content","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"linkedEditingRange":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"}}},"trace":"off","workspaceFolders":[{"uri":"file:///home/peterl/Projects/extract-website-text-content","name":"extract-website-text-content"}]}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"initialized","params":{}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/peterl/Projects/extract-website-text-content/src/extract.v","languageId":"v","version":1,"text":"module main\n\nimport os\nimport scanner\n\nfn main() {\n\tsitemap := os.args[1] // sitemap filename\n\tscanner.start(sitemap) // or { panic(err) }\n}\n"}}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/peterl/Projects/extract-website-text-content/src/extract.v"}}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","id":2,"method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///home/peterl/Projects/extract-website-text-content/src/extract.v"}}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","id":3,"method":"textDocument/foldingRange","params":{"textDocument":{"uri":"file:///home/peterl/Projects/extract-website-text-content/src/extract.v"}}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","id":4,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///home/peterl/Projects/extract-website-text-content/src/extract.v"}}}

Response

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/showMessage","params":{"type":2,"message":"VLS is early software. Please report your issue to github.com/vlang/vls if you encounter any problems."}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"VLS Version: 0.0.1.93767cb, OS: linux 64"}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"VLS executable path: /home/peterl/.vls/bin/vls_linux_x64"}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"VLS build with V 728b198"}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Client / Editor: Visual Studio Code 1.71.0 (PID: 163666)"}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Using V path (VROOT): /usr/lib/vlang"}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"is_logger_installed: true | is_logger_enabled: false | params.trace: off"}}

[2022-09-06 18:53:43] {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":["=",".",":","{",",","("," "]},"signatureHelpProvider":{"triggerCharacters":["("],"retriggerCharacters":[","," "]},"definitionProvider":true,"typeDefinitionProvider":false,"implementationProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":false,"codeLensProvider":{"resolveProvider":false},"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"","moreTriggerCharacter":[]},"renameProvider":false,"documentLinkProvider":{"resolveProvider":false},"colorProvider":false,"declarationProvider":false,"executeCommandProvider":{"commands":[]},"foldingRangeProvider":true,"experimental":{}}}}

peterlerche avatar Sep 06 '22 19:09 peterlerche