Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSC Feature Flags / Optional Units #5049

Open
Trenly opened this issue Dec 9, 2024 · 1 comment
Open

DSC Feature Flags / Optional Units #5049

Trenly opened this issue Dec 9, 2024 · 1 comment
Labels
Command-Configure Issue related to WinGet Configuration Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@Trenly
Copy link
Contributor

Trenly commented Dec 9, 2024

Description of the new feature / enhancement

When writing a DSC file, there may be both common workflows (the ideal use case for DSC) as well as optional workflows that may be necessary for various development areas. Take winget-dsc as an example - users working on any DSC resource in that repository will need some standard set of tools, which are currently installed by the configuration.dsc.yaml.

If working on the NpmDsc resource, then Node.js should also be installed. However, not all contributors will be contributing to that resource and may not want Node.js installed if it is not necessary for their contributions. The same could be said about Python - users may already have a specific version installed and not want the latest, or may not want Python at all, if they are not working on that DSC resource.

It would be beneficial if there were a way to specify steps in a DSC yaml file as optional. Inspiration could be taken from Rust's features implementation, where the defaults can be set by the author of the resource, and consumers can use --no-default-features to disable all optional configuration units, and/or --features [<feature>] to enable specific optional modules if they are not specified as a default feature

Proposed technical implementation details

No response

@Trenly Trenly added the Issue-Feature This is a feature request for the Windows Package Manager client. label Dec 9, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Dec 9, 2024
@denelon denelon removed the Needs-Triage Issue need to be triaged label Dec 9, 2024
@denelon
Copy link
Contributor

denelon commented Dec 9, 2024

Parameters can be used in the latest (DSC v3) configuration schema to handle some of this, but I hadn't thought about the use of parameters to drive optional pieces of a configuration. I think this warrants some discussion in terms of what WinGet would show for the configuration to be run and how to reason about conditional behaviors in a configuration.

@denelon denelon added the Command-Configure Issue related to WinGet Configuration label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Configure Issue related to WinGet Configuration Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

2 participants