microsoft / microsoft/vscode-cpptools

[Regression] Extra error property "compilerPathInCppPropertiesJson" appear when entering invalid information after adding new configuration

Open
#12,662 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Language Service regression
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and Version: Win/Linux/macOS
  • VS Code Version: 1.92.2
  • C/C++ Extension Version: 1.22.1(pre-release)
  • If using SSH remote, specify OS of remote machine: NA
Bug Summary and Steps to Reproduce

Bug Summary: Extra error property "compilerPathInCppPropertiesJson" appear when entering invalid information after adding new configuration

Steps to reproduce:

  1. 'C/C++ Configurations UI' & 'c_cpp_properties.json' file side-by-side.
  2. Add a new configuration in 'C/C++ Configurations UI', named Test.
  3. Select the earlier default configuration(such as: Win32) in the Configuration drop-down box
  4. Type xx in 'Compiler arguments' box under 'C/C++ Configurations UI' page.
  5. Observe 'c_cpp_properties.json' file.

Actual behavior: Extra error property appears: "compilerPathInCppPropertiesJson": "cl.exe"
image

Expected behavior:
This is a regression issue; it cannot repro in C++ Extension v1.14.5
image

Configuration and Logs
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeCppProperties (id: 27)
LSP: (invoked) cpptools/didChangeCppProperties (id: 27)
LSP: Sending response (id: 27)
LSP: (received) cpptools/didChangeCppProperties (id: 28)
LSP: (invoked) cpptools/didChangeCppProperties (id: 28)
LSP: Sending response (id: 28)
LSP: (received) cpptools/didChangeCppProperties (id: 29)
LSP: (invoked) cpptools/didChangeCppProperties (id: 29)
Attempting to get defaults from C compiler in "compilerPath" property: 'cl.exe'
Attempting to get defaults from C++ compiler in "compilerPath" property: 'cl.exe'
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\CPPWINRT\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UCRT\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\WINRT\ will be indexed
  Folder: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\VC\TOOLS\MSVC\14.42.34226\ATLMFC\INCLUDE\* will be indexed
  Folder: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\VC\TOOLS\MSVC\14.42.34226\INCLUDE\* will be indexed
  Folder: C:\USERS\V-ERICAWU\DESKTOP\TEST\ will be indexed
LSP: Sending response (id: 29)
LSP: (received) cpptools/didChangeCppProperties (id: 30)
LSP: (invoked) cpptools/didChangeCppProperties (id: 30)
LSP: Sending response (id: 30)
LSP: (received) cpptools/didChangeCppProperties (id: 31)
LSP: (invoked) cpptools/didChangeCppProperties (id: 31)
Attempting to get defaults from C compiler in "compilerPath" property: 'cl.exe'
Attempting to get defaults from C++ compiler in "compilerPath" property: 'cl.exe'
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\CPPWINRT\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UCRT\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM\ will be indexed
  Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\WINRT\ will be indexed
  Folder: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\VC\TOOLS\MSVC\14.42.34226\ATLMFC\INCLUDE\* will be indexed
  Folder: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\VC\TOOLS\MSVC\14.42.34226\INCLUDE\* will be indexed
  Folder: C:\USERS\V-ERICAWU\DESKTOP\TEST\ will be indexed
LSP: Sending response (id: 31)
Discovering files...
  Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED\
  Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UCRT\
  Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\CPPWINRT\
  Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM\
  Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\WINRT\
LSP: (received) cpptools/didChangeCppProperties (id: 32)
LSP: (invoked) cpptools/didChangeCppProperties (id: 32)
LSP: Sending response (id: 32)
  Processing folder (non-recursive): C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\VC\TOOLS\MSVC\14.42.34226\ATLMFC\INCLUDE
  Processing folder (non-recursive): C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PREVIEW\VC\TOOLS\MSVC\14.42.34226\INCLUDE
  Processing folder (recursive): C:\USERS\V-ERICAWU\DESKTOP\TEST\
  Discovering files: 5035 file(s) processed
  0 file(s) removed from database
Done discovering files.
Populating include completion cache.
Parsing remaining files...
  Parsing: 0 files(s) processed
Done parsing remaining files.
Other Extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the C/C++ Configurations UI beside c_cpp_properties.json, following the listed steps with the reported VS Code and extension versions. Trace the configuration update triggered by invalid compiler arguments and compare the generated JSON with the expected behavior; done means the extra compilerPathInCppPropertiesJson property no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.