cquery-project / vscode-cquery

cquery plugin for Visual Studio Code
54 stars 16 forks source link

Call hierarchy is empty #17

Closed MarkZ3 closed 6 years ago

MarkZ3 commented 6 years ago

Using VSCode 1.20.1 cquery from latest master (fce932e89c0abc8fe6f1324171c7020cef80239f) cquery extension 0.0.9

It seems Call Hierarchy is not working properly. I cannot make it work for any functions. For example, if I open clang_complete.cc from the cquery code base, and do Call Hierarchy on "GetCompletionPriority", the pane pop-ups in VS Code but it stays empty. I'm not sure if this is a bug in the extension or Cquery itself.

jacobdufault commented 6 years ago

Please update cquery - the API changed yesterday. You'll also need to update your keybinding command if you have one.

MarkZ3 commented 6 years ago

I updated it about 20 mins ago: commit fce932e89c0abc8fe6f1324171c7020cef80239f Author: Fangrui Song i@maskray.me Date: Wed Feb 28 08:27:14 2018 -0800

Fix -Wunused-variable when CINDEX_VERSION >= 47

I don't use the keybinding, I used the context menu. Do I have to clear other cached files perhaps?

MaskRay commented 6 years ago

oh clangd dev!

What I complain about clangd is the very high contribution barrier and the painfully slow review process for outsiders. e.g. https://reviews.llvm.org/D41575 https://reviews.llvm.org/D40072 https://reviews.llvm.org/D39903

Nobody actually maintains libclang, right? Even deprecating some API is so difficult. The maintainer of qtcreator spends months to get each of his patch landed.

jacobdufault commented 6 years ago

I verified inheritance/call hierarchies still work for me. Have you used call hierarchy in the past? Maybe indexing is broken, does outline/code completion work?

MarkZ3 commented 6 years ago

I haven't used call hierarchy in the past. Completion works. How do you trigger the outline? Where is the index stored? Maybe I can try to delete it and start over?

jacobdufault commented 6 years ago

The index is in .vscode/cquery_cached_index.

Do you have clangd or the microsoft c++ extension installed? It may be possible they are providing completion instead of cquery. Outline is ctrl+shift+o in vscode, or F1 and then type '@'

MarkZ3 commented 6 years ago

Clearing .vscode/cquery_cached_index fixed it. It works great now, thanks! Perhaps there needed to be some index versioning change so that it gets rebuilt?

jacobdufault commented 6 years ago

Hmm, strange. There may be a bug in the cache invalidation logic.

MaskRay commented 6 years ago

off topic, i'd like to hear your thoughts on on-disk storage

MarkZ3 commented 6 years ago

@MaskRay We should probably discuss this and other topics. Is there another more suitable place for this? Does Cquery have a mailing list, forum or Gitter?

MaskRay commented 6 years ago

@MarkZ3 https://gitter.im/cquery-project/Lobby

WoW!