v-analyzer / v-analyzer

Bring IDE features for V programming languages in VS Code, Vim and other editors
MIT License
164 stars 18 forks source link

Request textDocument/documentSymbol failed #66

Open l-33ter opened 7 months ago

l-33ter commented 7 months ago

Describe the bug

In the nightly-version this information pops up. image

Here's the complete output:

[Info  - 9:53:21 PM] v-analyzer version: 0.0.2-beta.1, OS: linux x64
[Info  - 9:53:21 PM] v-analyzer executable path: /home/mrcl/.config/v-analyzer/bin/v-analyzer
[Info  - 9:53:21 PM] v-analyzer build with V 976c5fb
[Info  - 9:53:21 PM] v-analyzer build at 2023-12-08 21:53:21
[Info  - 9:53:21 PM] Client / Editor: Visual Studio Code - Insiders 1.85.0-insider (PID: 92966)
[Info  - 9:53:21 PM] Using local config: /home/mrcl/.config/v-analyzer/config.toml
[Info  - 9:53:21 PM] Find custom VROOT path in '.config/v-analyzer/config.toml' config
[Info  - 9:53:21 PM] Using "~/V/v" as toolchain
[Info  - 9:53:21 PM] Using "/home/mrcl/.cache/v-analyzer" as cache dir
[Info  - 9:53:21 PM] Using "/home/mrcl/.vmodules" as vmodules root
[Info  - 9:53:21 PM] Indexing /home/mrcl/.vmodules
[Info  - 9:53:21 PM] Indexing /home/mrcl/V/v/vlib
[Info  - 9:53:21 PM] Indexing /home/mrcl/.config/v-analyzer/metadata
[Info  - 9:53:21 PM] Indexing /home/mrcl
[Error - 9:54:23 PM] Request textDocument/documentSymbol failed.
TypeError: Cannot read properties of undefined (reading 'range')
    at Tn (/home/mrcl/.vscode-server-insiders/extensions/vosca.vscode-v-analyzer-0.0.2/out/extension.js:33:72702)
    at o (/home/mrcl/.vscode-server-insiders/extensions/vosca.vscode-v-analyzer-0.0.2/out/extension.js:33:48437)
    at Object.KD [as map] (/home/mrcl/.vscode-server-insiders/extensions/vosca.vscode-v-analyzer-0.0.2/out/extension.js:33:48523)
    at Object.di [as asSymbolInformations] (/home/mrcl/.vscode-server-insiders/extensions/vosca.vscode-v-analyzer-0.0.2/out/extension.js:33:72341)
    at c (/home/mrcl/.vscode-server-insiders/extensions/vosca.vscode-v-analyzer-0.0.2/out/extension.js:37:56146)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:447:9)
    at async d.provideDocumentSymbols (/home/mrcl/.vscode-server-insiders/bin/182f5125f2f8a8469e9dac4ed4795b804671bf7d/out/vs/workbench/api/node/extensionHostProcess.js:145:39708)

And after that for example println will not be able to 'autocomplete' image

Expected Behavior

Actually I don't know

Current Behavior

-

Reproduction Steps

-

Possible Solution

No response

Additional Information/Context

Running on WSL - Debian - Win11 Canary Build (26010)

Environment details (v doctor output)

V full version: V 0.4.3 976c5fb.2768de1
OS: linux, Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023 (WSL 2)
Processor: 8 cpus, 64bit, little endian, AMD Ryzen 9 3950X 16-Core Processor

getwd: /home/mrcl/CODING/vlang/1
vexe: /home/mrcl/V/v/v
vexe mtime: 2023-12-08 20:21:35

vroot: OK, value: /home/mrcl/V/v
VMODULES: OK, value: /home/mrcl/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.39.2
Git vroot status: weekly.2023.45.1-230-g2768de1f
.git/config present: true

CC version: cc (Debian 12.2.0-14) 12.2.0
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

Editor name

VSCode - Insiders

v-analyzer Version

v-analyzer version 0.0.2-beta.1

VS Code Extension Version

v0.0.2

Coachonko commented 7 months ago

Got the same issue

ttytm commented 7 months ago

Is it still happening when using the latest release binary?

Le0X8 commented 6 months ago

@ttytm yes an then it results in #91 :(