Update documentation to clarify semicolon escaping behavior#4693
Update documentation to clarify semicolon escaping behavior#4693
Conversation
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
|
@copilot in the changelog you linked the PR instead of the issue, but since this is a bug fix, the issue should be linked |
The changelog entry at line 10 already links to the issue URL ( |
|
@copilot why were semicolons escaped in the first place? I'm worried we are introducing a regression |
You are wrong. the issue is #4585 |
The escaping was likely added as a precaution for shell interpretation of semicolons (which act as command separators in shells). However, looking at The escaping was unnecessary because:
The only regression risk would be if CMake execution used |
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
|
@copilot take a look at this comment on the issue: #4585 (comment) It implies that no changes are needed in the parsing. This requires only a documentation update. Can you revert your changes and only do the documentation update? You may have to update the changelog description. Can you also update the description and title of the PR accordingly as well? |
…n escaping behavior Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Done in fd4e22c. I've:
|
|
@copilot can you remove this part of the doc update "which will be passed as MY_LIST=a;b to CMake." |
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
|
@copilot can you add the changelog update to bug fixes instead of creating a documentation section? |
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
src/util.tsandtest/unit-tests/util.test.tsdocs/cmake-settings.mdto clarify semicolon escaping behaviorSummary
Per the issue author's comment (#issuecomment-3385654002), the semicolon escaping is intentional behavior to prevent CMake from interpreting semicolons as list separators.
Solution: Updated documentation to clarify:
;) in string values are automatically escaped"MY_LIST": [ "a", "b" ])Files Changed:
docs/cmake-settings.md- Clarified semicolon escaping behavior incmake.configureSettingsdocumentationCHANGELOG.md- Added entry in "Bug Fixes" sectionOriginal prompt
This section details on the original issue you should resolve
<issue_title>[Bug] Incorrect escaping of semicolons in cmake.configureSettings</issue_title>
<issue_description>### Brief Issue Summary
When performing a CMake configure, cmake-tools incorrectly escapes semicolons. When setting up LLVM:
cmake-tools will configure with
"-DLLVM_ENABLE_RUNTIMES:STRING=libc\;compiler-rt". However, it is unnecessary to escape the semicolon because the whole parameter is enclosed in quotes. The result is that the semicolon is passed through to CMake erroneously.From the CMakeCache.txt file:
LLVM_ENABLE_RUNTIMES:STRING=libc\;compiler-rtCMake Tools Diagnostics
{ "os": "linux", "vscodeVersion": "1.104.3", "cmtVersion": "1.21.36", "configurations": [ { "folder": "/workspaces/llvm-project", "cmakeVersion": "4.1.2", "configured": true, "generator": "Ninja", "usesPresets": false, "compilers": { "C": "/usr/bin/clang", "CXX": "/usr/bin/clang++" } } ], "cpptoolsIntegration": { "isReady": false, "hasCodeModel": false, "activeBuildType": "", "buildTypesSeen": [], "requests": [], "responses": [], "partialMatches": [], "targetCount": 0, "executablesCount": 0, "librariesCount": 0, "targets": [] }, "settings": [ { "communicationMode": "automatic", "useCMakePresets": "auto", "configureOnOpen": true } ] }Debug Log