-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Feature: ConfigurationAn issue related to configuring the extension or IntelliSenseAn issue related to configuring the extension or IntelliSenseLanguage ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Windows 10 (Windows_NT x64 10.0.17134)
- VS Code Version: 1.30.2
- C/C++ Extension Version: 0.21.0
- Other extensions you installed (and if the issue persists after disabling them): None
I am unable to set a non-recursive includePath to the workspace root. I wish to add specific folders to the includePath, and exclude others. However since they are all subfolders of the workspace root, they are automatically included. It appears the extension always adds the workspace root as a recursive includePath.
Example c_cpp_properties.json
{
"configurations": [
{
"name": "MinGW",
"intelliSenseMode": "gcc-x64",
"compilerPath": "C:/msys32/opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe",
"includePath": [
"${workspaceFolder}/Sub/Include/**",
"${workspaceFolder}/Main/**",
"${workspaceFolder}/*"
],
"defines": [
"__GNUC__=5"
],
"cStandard": "c11",
"cppStandard": "c++14"
}
],
"version": 4
}
The C/C++ log shows the root folder is included recursively.
Code browsing service initialized
Populate include completion cache.
Discovering files...
Processing folder (recursive): C:/MSYS32/OPT/XTENSA-ESP32-ELF/LIB/GCC/XTENSA-ESP32-ELF/5.2.0/INCLUDE/
Processing folder (recursive): C:/MSYS32/OPT/XTENSA-ESP32-ELF/LIB/GCC/XTENSA-ESP32-ELF/5.2.0/INCLUDE-FIXED/
Processing folder (recursive): C:/MSYS32/OPT/XTENSA-ESP32-ELF/XTENSA-ESP32-ELF/INCLUDE/
Processing folder (recursive): C:/MSYS32/OPT/XTENSA-ESP32-ELF/XTENSA-ESP32-ELF/SYSROOT/USR/INCLUDE/
Processing folder (recursive): C:/PATH/TO/ROOT/
Discovering files: 1060 file(s) processed
0 file(s) removed from database
Done discovering files.
Parsing remaining files...
Parsing: 3 files(s) processed
Done parsing remaining files.
Expected behavior
I should be able to control the inclusion of the workspace root in the includePath. i.e. Set to non-recursive or exclude entirely.
Metadata
Metadata
Assignees
Labels
Feature: ConfigurationAn issue related to configuring the extension or IntelliSenseAn issue related to configuring the extension or IntelliSenseLanguage ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.