Skip to content

Conversation

@jason-test-account-1
Copy link

vsgo by default uses the actual include path that it passes to the compiler for intellisense purposes. This is obviously correct from a compilation point of view, but it creates serious issues with intellisense usability.

  1. When a header is opened from buck-out, it's a symlink to the source tree. But Visual Studio doesn't look through the symlink, so it thinks it's a completely different file from the one in the project. This leads to frequently having 2 copies of the same file opened in an editor.
  2. When a header is opened from buck-out, since it's not part of any project (again, VS doesn't look through the symlink) Visual Studio does not know what settings to use for intellisense. This means that if you right click an include statement from a cpp file and open the header file that way, you will get a header file in buck-out, and then since VS doesn't know what settings to use for Intellisense, the whole file will be filled with squigglies.

This PR addresses both of these issues by forcing raw headers mode whenever possible. This is only for Intellisense purposes, nothing about the behavior of executing a build is changed. It does this by copying the logic of headers_as_raw_headers from the cxx prelude. Unfortunately I was not able to reuse that function directly out of the prelude since a BxlContext and an AnalysisContext are not compatible types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants