microsoft / microsoft/vscode-cpptools
Improve how a Default config is selected when newly opening a folder containing an existing `c_cpp_properties.json`
@jureid is already working on this.
Since Mar 1, 2022.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
When creating a c_cpp_properties.json file, the default configuration is given an OS specific name. "Win32", "Mac", or "Linux". The same name is used to select a configuration when opening a folder containing an existing c_cpp_properties.json for the first time.
Suggestion: Use default configuration names that are specific to the OS, architecture, and a detected toolset. i.e. "Windows x64 MSVC", "macOS arm64 clang", "Linux armhf gcc"
This would apply only to newly created or newly opened folders. Any folders that had previously been opened would continue to preserve their currently selected config. In the 'existing configs' (newly opened) scenario, if none of the new default names were found, the legacy default could be used. If not found, it would be possible to fall back to another config somewhat intelligently, such as first ignoring toolset, then architecture. If still no match, the first (possibly only) config would be selected.
Or a more limited solution might be to use the fully qualified default names only when newly opening a folder containing an existing c_cpp_properties.json
This could enable projects to greatly reduce configuration complexity for their users/contributors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.