chanhx / crabviz

🦀 A LSP-based interative call graph generator
Apache License 2.0
674 stars 22 forks source link

URI error in Windows #27

Open Condzi opened 6 months ago

Condzi commented 6 months ago

My project is designed with unity build methodology, meaning that everything gets compiled from a single source file. This seems to break crabviz. Example from "Extension Host" log when I try to parse my project folder:

2024-03-01 18:38:52.317 [error] Error: [UriError]: Scheme contains illegal characters.
    at v (d:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:31508)
    at new k (d:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:32708)
    at w (d:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:34346)
    at k.parse (d:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:33200)
    at e.FileClassifier.classifyFilesInDirectory (c:\Users\conra\.vscode\extensions\chanhx.crabviz-0.3.2\dist\extension.js:1:107033)
    at async e.FileClassifier.classifyFilesByLanguage (c:\Users\conra\.vscode\extensions\chanhx.crabviz-0.3.2\dist\extension.js:1:106556) crabviz.generateCallGraph {"value":"chanhx.crabviz","_lower":"chanhx.crabviz"}

My compile_commands.json:

[ 
{ "directory": "W:\\hi\\build", "file": "..\\code\\game\\game_main.cpp", "output": "C:\\Users\\conra\\AppData\\Local\\Temp\\game_main-11638f.o", "arguments": ["C:\\Program Files\\LLVM\\bin\\clang++.exe", "-xc++", "..\\code\\game\\game_main.cpp", "-o", "C:\\Users\\conra\\AppData\\Local\\Temp\\game_main-11638f.o", "--driver-mode=g++", "-g", "-O0", "-I", "..\\code\\", "-I", "..\\code\\3rdparty", "-std=c++20", "-D", "WIN32", "-D", "_WINDOWS", "-D", "_HAS_EXCEPTIONS=0", "-D", "_CRT_SECURE_NO_WARNING", "-fno-exceptions", "-fno-rtti", "-ferror-limit=0", "-Wall", "-Wextra", "-Werror", "-Wno-format", "-Wno-pragma-once-outside-header", "-Wno-gcc-compat", "-Wno-missing-field-initializers", "-Wno-missing-braces", "-Wno-unused-function", "-fsanitize=undefined", "-fno-omit-frame-pointer", "-fuse-ld=lld-link", "-Wl,/MANIFEST:EMBED,/INCREMENTAL:NO,C:\\Program Files\\LLVM\\lib\\clang\\18\\lib\\windows\\clang_rt.ubsan_standalone-x86_64.lib,C:\\Program Files\\LLVM\\lib\\clang\\18\\lib\\windows\\clang_rt.ubsan_standalone_cxx-x86_64.lib", "-dumpdir", "game.exe-", "--target=x86_64-pc-windows-msvc19.38.33134"]}
]

And here's the project: Project. Simply try to parase the code/ directory to reproduce.

chanhx commented 6 months ago

It seems the project just supports Windows, but I don't have access to a Windows machine for the time being, will look into this issue later this month.

chanhx commented 5 months ago

This bug has been fixed in v0.4.0, please update the vscode extension.