-
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.regressionA bug that didn't exist in a previous releaseA bug that didn't exist in a previous release
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: macOS 10.15.4
- VS Code Version: 1.45.1
- C/C++ Extension Version: 0.28.0
In #5229 environment variables were changed to be split using a platform-specific delimiter (; on Windows and : for everything else, like Linux and macOS). However, joining arrays of strings in the env variable in c_cpp_properties.json was not properly updated to match this new behavior, causing such variables to be incorrectly parsed when substituted in configurations.
This causes bugs like lists of include directories to not resolve properly when used in multiple configurations on non-Windows machines.
Steps to reproduce
- Add a variable containing an array of strings to the
envsection ofc_cpp_properties.json. - Reference this variable in a configuration.
{
"env": {
"commonIncludes": [
"${workspaceFolder}/path/to/dir1",
"${workspaceFolder}/path/to/dir2"
]
},
"configurations": [
{
"name": "Mac",
"includePath": [
"${commonIncludes}"
]
}
],
"version": 4
}Incorrect behavior
-------- Diagnostics - 5/15/2020, 10:07:43 PM
Version: 0.28.0
Current Configuration:
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/path/to/dir1;${workspaceFolder}/path/to/dir2"
],
"compilerArgs": [],
"browse": {
"path": [
"${workspaceFolder}/path/to/dir1;${workspaceFolder}/path/to/dir2",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
No active translation units.
Expected behavior
-------- Diagnostics - 5/15/2020, 10:09:10 PM
Version: 0.27.1
Current Configuration:
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/path/to/dir1",
"${workspaceFolder}/path/to/dir2"
],
"compilerArgs": [],
"browse": {
"path": [
"${workspaceFolder}/path/to/dir1",
"${workspaceFolder}/path/to/dir2",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
No active translation units.
hexdae, jgavris and bryceschober
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.regressionA bug that didn't exist in a previous releaseA bug that didn't exist in a previous release