crabviz icon indicating copy to clipboard operation
crabviz copied to clipboard

Only function names without directed segments

Open forgetsuffering opened this issue 1 year ago • 10 comments

I have tried this plug-in several times with different java projects, and the generated results are only the functions in the project, and there is no calling relationship between functions, that is, directed line segments.I'm desperate to know what's causing this. Uploading pic.PNG…

forgetsuffering avatar May 26 '23 08:05 forgetsuffering

What extensions for Java do you have? I have the "Extension Pack for Java" installed in my VS Code, and the calling relationships are shown on the call graph.

Crabviz utilizes the "call hierarchy" capability of LSP server to get the calling relationships, so maybe you should check if "call hierarchy" for Java is supported in your VS Code. Just right click on the name of a Java function, and see if there is a "Show Call Hierarchy" option in the context menu.

chanhx avatar May 26 '23 09:05 chanhx

What extensions for Java do you have? I have the "Extension Pack for Java" installed in my VS Code, and the calling relationships are shown on the call graph.

Crabviz utilizes the "call hierarchy" capability of LSP server to get the calling relationships, so maybe you should check if "call hierarchy" for Java is supported in your VS Code. Just right click on the name of a Java function, and see if there is a "Show Call Hierarchy" option in the context menu.

Ok, thank you. By the way, do I need to compile the project before using this function.

forgetsuffering avatar May 26 '23 09:05 forgetsuffering

do I need to compile the project before using this function.

No, you don't need to compile it.

chanhx avatar May 26 '23 12:05 chanhx

I came across this issue recently. It seems to happen when you open a new project, and run Crabviz without any tabs open (the language server has not started). I just rerun the command after waiting a few seconds in that case, and then I got the result as expected. Maybe you can try it again if no edges are shown in the result.

The response of vscode.prepareCallHierarchy is an empty array in the above case, not much info to tell whether the language server is ready or not, so there is no retry logic currently. But I think maybe we can track whether all responses are empty, and retry several times before getting non-empty response. I will try it later.

chanhx avatar Jun 03 '23 04:06 chanhx

What extensions for Java do you have? I have the "Extension Pack for Java" installed in my VS Code, and the calling relationships are shown on the call graph.

Crabviz utilizes the "call hierarchy" capability of LSP server to get the calling relationships, so maybe you should check if "call hierarchy" for Java is supported in your VS Code. Just right click on the name of a Java function, and see if there is a "Show Call Hierarchy" option in the context menu.

First of all, thank you very much for Crabviz! I have "Show Call Hierarchy" and it works, but Crabviz only shows modules, not call curves. I'm running vscode on a remote aarch64 server on a local win. It is worth noting that Crabviz was normal before. @chanhx

corn27 avatar Sep 29 '24 08:09 corn27

I'm running vscode on a remote aarch64 server on a local win.

Seems there are some problems with remote development, I'll look into it later.

chanhx avatar Sep 29 '24 12:09 chanhx

Thank you@chanhx . Here are some clarifications:

  • The version of Crabviz is 0.4.0.
  • C/C++ is used in the remote server.
  • The "Call Hierarchy" works.
  • And everything worked the first time I used it, the vanishing curve happened today.

corn27 avatar Sep 29 '24 13:09 corn27

Thank you@chanhx . Here are some clarifications:

  • The version of Crabviz is 0.4.0.
  • C/C++ is used in the remote server.
  • The "Call Hierarchy" works.
  • And everything worked the first time I used it, the vanishing curve happened today.

Thank you very much for providing the information.

Did you connect the remote server the first time you used the extension?

chanhx avatar Sep 29 '24 13:09 chanhx

Did you connect the remote server the first time you used the extension?

Yes, the first time, I connect the remote server and install Crabviz on it. I have been using it this way until today. But I didn't use Crabviz last week.

corn27 avatar Sep 29 '24 13:09 corn27

I have been using it this way until today. But I didn't use Crabviz last week.

don't have a clue now, I need to look into it.

chanhx avatar Sep 29 '24 16:09 chanhx