Closed lucky9-cyou closed 6 months ago
Please check about incoming calls of Task::update_task_status_result
and Resource::finish_task
to see if finish_task
is there. (right click on the function name, select “Show Call Hierarchy” on the context menu, and then switch to show incoming calls.)
when i open finish_task
call graph, it will show following result:
The call graph is right, but why didn't it appear in previous image?
Crabviz fetches just incoming calls when generating call graphs for selected files. While generating call graphs for selected functions, Crabviz fetches both incoming calls and outgoing calls.
I guess maybe those two calls are returned in outgoing calls, but not in incoming calls.
So, please help check about call hierarchies of these functions, show incoming calls of Task::update_task_status_result
and Resource::finish_task
, and outgoing calls of finish_task
.
The outgoing calls of finish_task
are as follows:
The incomming calls of
Task::update_task_status_result
is as follows:
The incoming calls of
Resource::finish_task
is as follows:
Crabviz fetches just incoming calls when generating call graphs for selected files. While generating call graphs for selected functions, Crabviz fetches both incoming calls and outgoing calls.
I guess maybe those two calls are returned in outgoing calls, but not in incoming calls.
So, please help check about call hierarchies of these functions, show incoming calls of
Task::update_task_status_result
andResource::finish_task
, and outgoing calls offinish_task
.![]()
It might be possible to add some options, so that when generating a call graph for selected files, it fetches both incoming calls and outgoing calls.
Thank you so much! The language server does return the calling relationships which were not drawn on the graph. Is this bug reproducible? If yes, then is the code open source? Or could you provide a minimal reproducible sample? Many thanks!
It might be possible to add some options, so that when generating a call graph for selected files, it fetches both incoming calls and outgoing calls.
There are cases that calls are returned in incoming calls but not in outgoing calls, and not vice-versa. So just fetching incoming calls should be enough.
I try to generate a minimal reproducible sample, but it doesn't work. The call graph of finish_task
will show. And when I delete other function in my project, the call graph of finish_task
will also show.
My code repo is private, but I can invite you as collaborators temporarily.
Thanks for your help very much.
I greatly appreciate all your help!
I just tested crabviz on your project, and I think it worked as expected. Here is the output graph.
All information is from the language server, so you should wait till the language server is ready before generating a call graph.
This is very strange, my language server is already prepared. Could this possibly be related to the version of the toolchain or rust-analyzer? My toolchain version is 1.77.0 nightly, my rust-analyzer version is v0.3.1860.
when i try it in another computer with 1.78.0 nightly, it still doesn't show call graph of finish_task
:
Same RA version here, and toolchain version is 1.78.0-nightly (fc3800f65 2024-02-26)
, no issues.
Please check the call hierarchies again, if the results are as expected, then run crabviz again to generate a new call graph.
I still get the wrong results, and I'm not quite sure why that is. Anyway, thank you for your patient help and the outstanding project.
The crabviz doesn't work for some function, like![image](https://github.com/chanhx/crabviz/assets/56758695/657e1835-b3db-46d1-830e-c5a238ccf36a)
finish_task
in following image: