Type: LanguageService
Describe the bug
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
env section of c_cpp_properties.json.{
"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.
Any way this can make it back into a 0.28.next? What's the ETA on 0.29.0?
@bryceschober Yes, this should get into our next release. I'd prefer to release an update next week, but we're not sure yet.
Your fix is available with https://github.com/microsoft/vscode-cpptools/releases/tag/0.28.2 .
@sean-mcmanus Thanks for the back-port & bug-fix release.