chanhx / crabviz

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

Doesn't Identify Calls Through Actix Route #7

Closed Torsitano closed 11 months ago

Torsitano commented 1 year ago

Neat extension, I went to test it on some stuff I had lying around and noticed that it didn't identify functions that were called as routes for Actix. I have a repo that I was using while working through Zero to Production in Rust that I used to test.

I found that when looking at the graph for the entire src folder, it shows that my functions for routes are never called:

image

When checking the call hierarchy in VS Code, it correctly shows that this health_check function is called by run, which is called by spawn_app and main:

image

Source is here for reference: https://github.com/Torsitano/zero-to-rust/blob/main/src/routes/health_check.rs

chanhx commented 1 year ago

Thank you for providing such a detailed report. I use the vscode.provideOutgoingCalls command to get the outgoing calls, and it seems it's because health_check is not directly called by run, so it's not included. I don't know how VS Code gets that, will need some time to figure out how to fix it.

chanhx commented 1 year ago

This is fixed in v0.1.2, please update the extension and check it out.

image