-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Code analysis misses includes generated at build time #7221
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
Comments
@Colengms Do you have enough info to repro/investigate this? Or do we need more logging? |
@anatolyburakov A couple questions to help us investigate this:
I see the command line includes a forced-include of the file the error is associated with ( |
Hi @anatolyburakov . In addition to my previous two questions, would it be possible to provide a minimal example we could use to investigate further? If the issue persists after the file has been created and VS Code reloaded, we will need to investigate further to identify the cause. Or, if the issue does not persist after the file has been created and VS Code reloaded, I believe I have a fix for our next insiders build. |
No, the error never goes away. Well, it's not there when the file is first loaded, but by the time code analysis is complete, i get this error always, even if i close/reopen the file.
Yes, it does. It's the same folder
I believe i reported that specific bug too :D no, reloading etc. doesn't help with this error.
I will try to create a minimally reproducible example. |
Here's a minimal example that i can reproduce on my machine: https://github.com/anatolyburakov/vscode_7221_repro After building and reloading the file, i see the following: |
All the compile commands paths are being incorrectly taken from the workspace folder instead of the "directory" of the compile commands. Appears to be a 1.3.0-insiders regression. |
Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.3.0-insiders2 (at least with the sample repro case you provided) -- let us know if you still notice any other related issues. |
@sean-mcmanus seems to be fixed for the minimal example, but i still see the issue on real codebase. |
@sean-mcmanus it turns out that my errors are due to a different bug. I'll submit a new one, but this issue appears to be fixed. Thanks! |
Issue Type: Bug
We have a project that relies on build-time configuration for some things. This build-time configuration is in the form of a C header file (
rte_build_config.h
) that gets dropped into the build directory.When running code analysis on any source files that end up including this file, i get the following error:
Looking at my
compile_commands.json
, i can see the following:The
rte_build_config.h
is not included directly, but is included byrte_common.h
which in turn is included somewhere along the line frommain.c
. The file is located at the build directory, andcompile_commands.json
appears to include build directory:So, the
rte_build_config.h
should be found, but isn't for some reason.It also appears that there is no way to tell the C++ extension to either force-include this file or this directory (as when
compile_commands.json
is used, other configuration appears to be overridden), or tell it to look for it in the build directory in addition to source directory (despite the fact that the compile command itself contains thedirectory
key which contains the path where the file is located, and thecompile_commands.json
includes that path).Extension version: 1.3.0-insiders
VS Code version: Code - Insiders 1.55.0-insider (8437d38d364ba93b53c1e659c20b1c86f710ec28, 2021-03-24T08:16:02.872Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 5.8.7
A/B Experiments
The text was updated successfully, but these errors were encountered: