microsoft / microsoft/winget-cli

Extend native DSC v3 resources in WinGet Client (PackageList, Pin, and installer type)

Open
#6,289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DSC-Resource Issue-Feature
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/Package
  • Microsoft.WinGet/Source
  • Microsoft.WinGet/UserSettingsFile
  • Microsoft.WinGet/AdminSettings

The remaining enhancements are:

  • Add an optional per-package installerType requirement to package resources.
  • Add Microsoft.WinGet/PackageList for declaring a package set with guarded DSC _purge
    semantics.
  • Add Microsoft.WinGet/Pin for 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> --get
  • winget dscv3 <resource> --set
  • winget dscv3 <resource> --test
  • winget dscv3 <resource> --export
  • winget dscv3 <resource> --schema
  • winget dscv3 <resource> --manifest

Microsoft.WinGet/PackageList should:

  • accept package-specific source, version, installer type, install mode, and agreement settings
  • treat installerType as a requirement when specified
  • support opt-in _purge behavior that defaults to false
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.