Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Intellisense] Annoying error message when viewing git diffs. #1475

Closed
vadimcn opened this issue Jan 19, 2018 · 9 comments
Closed

[Intellisense] Annoying error message when viewing git diffs. #1475

vadimcn opened this issue Jan 19, 2018 · 9 comments
Labels
fixed Check the Milestone for the release in which the fix is or will be available. quick fix
Milestone

Comments

@vadimcn
Copy link

vadimcn commented Jan 19, 2018

VSCode: 1.19.2
Extension: 0.14.6

I've configured C++ intellisense to use the compile_commands.json file from cmake.

Whenever I view git diffs (using GitLens extension), the C++ extension keeps popping up errors similar to this: "application-20626910647KP2B8X6OONie.cpp" not found in "${workspaceRoot}/build/compile_commands.json". Using 'includePath' setting in c_cpp_properties.json.

I think there should be a way to disable this message.
(And was it necessary in the first place? Using fallback after failure to parse source file does not generate an error message, so why should this?)

@sean-mcmanus sean-mcmanus self-assigned this Jan 22, 2018
@sean-mcmanus sean-mcmanus added this to the March 2018 milestone Jan 22, 2018
@sean-mcmanus sean-mcmanus added fixed Check the Milestone for the release in which the fix is or will be available. quick fix labels Jan 22, 2018
@sean-mcmanus
Copy link
Contributor

Okay, we fixed it via not issuing that warning if the missing file isn't under the workspace root.

@sean-mcmanus
Copy link
Contributor

We believe this is fixed with the preview .vsix at https://github.com/Microsoft/vscode-cpptools/releases/tag/v0.15.0-insiders (our final release is planned for next week). Let us know if the fix isn't working sufficiently.

@vadimcn
Copy link
Author

vadimcn commented Feb 5, 2018

The error message seems to be fixed. Thanks!

I still see the error squiggles for includes. Perhaps those should be disabled as well?

@sean-mcmanus
Copy link
Contributor

Error squiggles for includes is a different issue (seems like #791 , although it could be #1520 ). That squiggle is probably intentional, indicating that the includePath or browse.path wasn't sufficient to find the header.

@vadimcn
Copy link
Author

vadimcn commented Feb 6, 2018

Isn't the problem that the include path is supposed to be found in compile_commands.json, and for git diff files this doesn't work?

@sean-mcmanus
Copy link
Contributor

Yeah, the error squiggle you see is "by design" since users can theoretically fix it via adding the path to the includePath setting.

@vadimcn
Copy link
Author

vadimcn commented Feb 6, 2018

I hate to argue this point, because the annoyance of squiggles in minimal... however, the whole point of using compile_commands.json is that one doesn't need to maintain includePath manually (also, when using cmake, the include path may be significantly different for different files in the project).

@sean-mcmanus
Copy link
Contributor

So what fix are you proposing we do? Isn't this just for the temporary files generated by "git diff"?

@vadimcn
Copy link
Author

vadimcn commented Feb 6, 2018

Same as above - if the file is not under the workspace root, disable error squiggles. Or, possibly, do that only when compile_commands.json is in use.

Anyhow, I'm gonna stop annoying you about this. Thanks fixing the error message problem!

@sean-mcmanus sean-mcmanus removed their assignment Apr 22, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Check the Milestone for the release in which the fix is or will be available. quick fix
Projects
None yet
Development

No branches or pull requests

2 participants