microsoft / microsoft/vscode-cmake-tools
Mechanism for restricting build variants to a valid set
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### Brief Issue Summary
Hi, this is a suggestion for a new feature which I feel would be really useful. The build options in cmake-variants.yaml are permuted to produce all the variants presented in the drop-down. As you mention [here](https://vector-of-bool.github.io/docs/vscode-cmake-tools/variants.html), the number of variants grows very large for a project with a few options. But often, in some projects there are often only a few valid variants. It would be really useful to be able to only present these valid ones to the user.
Could there be an option within cmake-variants.yaml to list valid variants, perhaps an additional entry such as validVariants?
If this was felt to be a good idea, I would be happy to have a go at coding this myself.
### CMake Tools Diagnostics
```shell
N/A
```
### Debug Log
```shell
N/A
```
### Additional Information
_No response_
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.
Research direction
Start with the cmake-variants.yaml configuration and the variants documentation linked in the issue. Review how build options are currently presented, then define the validVariants format and its expected behavior for combinations. Done means invalid permutations are excluded from the user-facing variant list without changing valid variants.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100