chanhx / crabviz

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

Error in language detection #25

Closed huang12zheng closed 7 months ago

huang12zheng commented 8 months ago

I want to show graphviz about cranelift, but found error as follow.

I don't know exactly why. Can you take a look for me?

2023-12-28 22:52:16.484 [error] Error: command failed with error code 2: error parsing glob '!/{**/*.css,**/*.csv,**/*.gif,**/*.gitignore,**/*.html,**/*.md,**/*.jpeg,**/*.jpg,**/*.json,**/*.lex,**/*.lock,**/*.log,**/*.png,**/*.toml,**/*.txt,**/*.xml,**/*.yaml,**/*.yacc,**/*.yml,fuzz/artifacts,fuzz/corpus,benches/wasi/test.bin,benches/instantiation/wasi.wasm,*.bk,*.pyc,*.swo,*.swp,*.swx,*~,.*.rustfmt,.mypy_cache,/#*/#,cranelift.dbg*,docs/_build,docs/book,.vscode/,.vs/,rusty-tags.*,tags,target,.z3-trace,foo,.cargo,publish,vendor,examples/build,examples/.cache,*.coredump,docs/assemblyscript-hello-world/node_modules/,docs/assemblyscript-hello-world/package-lock.json,docs/assemblyscript-hello-world/*.lock,docs/assemblyscript-hello-world/*.{wat,wasm},docs/assemblyscript_demo/node_modules/,docs/assemblyscript_demo/package-lock.json,docs/assemblyscript_demo/*.lock,docs/assemblyscript_demo/*.{wat,wasm},crates/wasi-common/WASI/*.bk,crates/wasi-common/WASI/*.swp,crates/wasi-common/WASI/*.swo,crates/wasi-common/WASI/*.swx,crates/wasi-common/WASI/tags,crates/wasi-common/WASI/target,crates/wasi-common/WASI/Cargo.lock,crates/wasi-common/WASI/.*.rustfmt,crates/wasi-common/WASI/rusty-tags.*,crates/wasi-common/WASI/*~,crates/wasi-common/WASI//#*/#,crates/wasi-common/WASI/tools/witx/target,crates/wasi-common/WASI/tools/witx/Cargo.lock,crates/c-api/html,crates/c-api/wasm-c-api/out,crates/c-api/wasm-c-api/v8,crates/environ/target/,crates/environ/**/*.rs.bk,crates/environ/Cargo.lock,crates/environ/fuzz/corpus,crates/environ/fuzz/artifacts,crates/bench-api/stdout.log,crates/bench-api/stderr.log,crates/fuzzing/wasm-spec-interpreter/ocaml/_build,crates/fuzzing/wasm-spec-interpreter/ocaml/spec,cranelift/isle/target,cranelift/isle/*~,cranelift/isle/.*.swp,cranelift/isle/fuzz/target,cranelift/isle/fuzz/corpus,cranelift/isle/fuzz/artifacts,cranelift/docs/_build,tests/wasi_testsuite/wasi-common/tests/rust/target/,tests/wasi_testsuite/wasi-common/tests/assemblyscript/node_modules/,tests/spec_testsuite/commit_message,tests/spec_testsuite/repos/,tests/wasi_testsuite/wasi-threads/test/testsuite/*.wasm,tests/wasi_testsuite/wasi-common/*.wasm,tests/wasi_testsuite/wasi-common/.DS_Store,tests/wasi_testsuite/wasi-common/test-runner/__pycache__/,tests/wasi_testsuite/wasi-common/test-runner/.coverage,tests/wasi_testsuite/wasi-common/tests/c/testsuite/fs-tests.dir/writeable/*,tests/wasi_testsuite/wasi-common/tests/c/testsuite/fs-tests.dir/writeable/!.gitignore}': nested alternate groups are not allowed

    at T (vscode-file://vscode-app/Users/huangzheng/Desktop/Visual%20Studio%20Code%202.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1861:5893)
    at vscode-file://vscode-app/Users/huangzheng/Desktop/Visual%20Studio%20Code%202.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1869:4355
    at async vscode-file://vscode-app/Users/huangzheng/Desktop/Visual%20Studio%20Code%202.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1869:2925 crabviz.generateCallGraph {"value":"chanhx.crabviz","_lower":"chanhx.crabviz"}
chanhx commented 8 months ago

There is a bug in language detection, more specifically, in applying ignore rules in file finding. I will fix it later.

For now, you can open the cranelift folder in a new window to bypass the bug.

chanhx commented 7 months ago

I just published a new version 0.3.2 fixing this bug. Please update and try it out.