microsoft / microsoft/vscode-cmake-tools

Preset includes with UNC paths not working with VSCode >=1.78.1

Open
#3,172 2 comments 0 reactions 0 assignees View on GitHub
enhancement Feature: presets
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

Beginning with version `1.78.1` VSCode starts to [restrict the access to UNC paths](https://code.visualstudio.com/docs/setup/windows#_working-with-unc-paths) on Windows. At work, we have some CMake presets that we share accross projects in the whole department. They are available on a network drive and accessed via UNC paths, e.g.:
```json
{
"version": 4,
"include": ["//somedrive/artifacts/.../Presets.json"],
...
}
```
After the latest VSCode update I noticed that this failed with the following error message:
```txt
[presetController] Included presets file \\somedrive\artifacts\...\Presets.json cannot be found
```
Since it is a security feature of VSCode, I suppose you cannot prevent this from happening. But maybe you can check if an include uses UNC paths and then provide some information in the error message on what the problem is and how users can fix it, so others don't have to invest too much time in fixing it.

### CMake Tools Diagnostics

```shell
{
"os": "win32",
"vscodeVersion": "1.78.1",
"cmtVersion": "1.14.31",
"configurations": [
{
"folder": "z:\\ente132_OpcPubSub_main_sdv",
"cmakeVersion": "3.25.3",
"configured": false,
"generator": "",
"usesPresets": true,
"compilers": {}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": false,
"activeBuildType": "",
"buildTypesSeen": [],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 0,
"executablesCount": 0,
"librariesCount": 0,
"targets": []
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": null
}
]
}
```

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the included-presets failure on Windows with VSCode 1.78.1 and a UNC include such as //somedrive/artifacts/.../Presets.json. Trace the presetController handling that emits “Included presets file ... cannot be found.” Done means the diagnostic explains the VSCode UNC-path restriction and points users toward the relevant fix or configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript, vscode
Domain
build-system, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.