microsoft / microsoft/winget-cli
Extend native DSC v3 resources in WinGet Client (PackageList, Pin, and installer type)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
- DSC Resource
- WinGet CLI
Description of the new feature / enhancement
Extend the native DSC v3 command resources shipped with the WinGet client to cover package-set
convergence and package pins while improving package installer selection.
WinGet already provides these native resources:
Microsoft.WinGet/PackageMicrosoft.WinGet/SourceMicrosoft.WinGet/UserSettingsFileMicrosoft.WinGet/AdminSettings
The remaining enhancements are:
- Add an optional per-package
installerTyperequirement to package resources. - Add
Microsoft.WinGet/PackageListfor declaring a package set with guarded DSC_purge
semantics. - Add
Microsoft.WinGet/Pinfor declarative package pin management. - Export WinGet Configuration files using native resources.
Native command resources avoid the PowerShell adapter overhead required by the
Microsoft.WinGet.DSC class-based resources.
Proposed technical implementation details
Users author, test, and apply the resources through winget configure. The existing winget dsc
alias remains equivalent to winget configure.
The implementation-facing winget dscv3 commands continue to implement the DSC command-resource
protocol used by the resource manifests:
winget dscv3 <resource> --getwinget dscv3 <resource> --setwinget dscv3 <resource> --testwinget dscv3 <resource> --exportwinget dscv3 <resource> --schemawinget dscv3 <resource> --manifest
Microsoft.WinGet/PackageList should:
- accept package-specific source, version, installer type, install mode, and agreement settings
- treat
installerTypeas a requirement when specified - support opt-in
_purgebehavior that defaults tofalse - remove only packages WinGet can establish were authoritatively managed by WinGet
- never remove unknown, best-effort-correlated, protected, or unsupported Windows software
- require an enabling Group Policy before processing
_purge: true
Microsoft.WinGet/Pin should manage one pin per resource instance and use DSC _exist for removal.
Specification: https://github.com/microsoft/winget-cli/pull/6291
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 specification in pull request 6291 and the existing winget dscv3 <resource> command-resource protocol. Review the Package, PackageList, and Pin resource behavior described here, including installer requirements, guarded _purge, and _exist removal. Done means the resources support get, set, test, export, schema, and manifest through winget configure with the stated safety rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100