microsoft / microsoft/vscode-cmake-tools

"Set Build Target" list is empty after configure even though "Project Outline" pane contains targets

Open
#1,519 9 comments 0 reactions 0 assignees View on GitHub
Feature: build investigation needed
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

CMake Tools has been working fine for me for ages, but suddenly it's started exhibiting a problem this afternoon. Normally the option to pick a build target would be populated with items from CMake, but now it is always empty. This happens even after I configure from within VS Code. In this situation the Project Outline pane is populated with items correctly, so something is working differently in the target picker type-in. Is there some logging I can enable to debug this? Perhaps some cache files somewhere have become corrupted. I've restarted VS Code, rebooted the machine, even deleted and recreated my build folders to no avail.

### Expected:

1. Configure with VS Code
2. Examine Project Outline pane and see it is correctly populated with targets
3. Click build target button on bottom toolbar, or use "CMake: Set Build Target" from command palette
4. Popup should be populated with target names

### Apparent Behavior:

1. Configure with VS Code
2. Examine Project Outline pane and see it is correctly populated with targets
3. Click build target button on bottom toolbar, or use "CMake: Set Build Target" from command palette
4. No targets are shown and type-in accepts free text

### CMake Tools Log

Contains sensitive info. If pointed at some further logging I can investigate further on my end.

### Platform and Versions

- **Operating System**: macOS Catalina 10.15.6
- **CMake Version**: 3.18.4
- **VSCode Version**: 1.50.1
- **CMake Tools Extension Version**: 1.4.2
- **Compiler/Toolchain**: Apple Clang 11.0.3

### Additional Information

I do see this in the CMake output, but according to the reported issue it should have no impact:
```
[cmakefileapi-parser] Code model version (2.1) of cmake-file-api is unexpected. Expecting (2.0). IntelliSense configuration may be incorrect.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported workflow in VS Code: configure a CMake project, compare the Project Outline targets with the "CMake: Set Build Target" picker, and inspect the CMake Tools log. No source files or tests are named; done means the target picker is populated consistently with the Project Outline targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript, vscode
Domain
build-system, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.