jacobdufault / cquery

C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symlinks wreak havoc

nsabovic opened this issue · comments

I'm working on Gstreamer project, and the build system generates a few symlinks to the directories inside the projects (like gst-plugins-base -> ../subprojects/gst-plugins-base). Opening the original file works, opening through the symlink doesn't, and generates errors like these:

[Error - 12:48:45 PM] Request textDocument/documentLink failed.
  Message: Unable to find file /Users/me/projects/gstreamer-utilities/gst-build/gst-plugins-base/gst/encoding/gstencodebin.c
  Code: -32603 
[Error - 12:48:45 PM] Request textDocument/codeAction failed.
  Message: Unable to find file /Users/me/projects/gstreamer-utilities/gst-build/gst-plugins-base/gst/encoding/gstencodebin.c
  Code: -32603 
[Error - 12:48:45 PM] Request textDocument/codeLens failed.
  Message: Unable to find file /Users/me/projects/gstreamer-utilities/gst-build/gst-plugins-base/gst/encoding/gstencodebin.c
  Code: -32603 
[Error - 12:48:45 PM] Request textDocument/hover failed.
  Message: Unable to find file /Users/me/projects/gstreamer-utilities/gst-build/gst-plugins-base/gst/encoding/gstencodebin.c
  Code: -32603 

Would it make sense to try to open the absolute path in case of failure instead of erring out?