Skip to content

Resolve WinGet source refresh issues and bump version to 0.12.0 - #44

Merged
Gabriel Dufresne (GabrielDuf) merged 3 commits into
masterfrom
system-winget-resolution
Sep 9, 2026
Merged

Resolve WinGet source refresh issues and bump version to 0.12.0#44
Gabriel Dufresne (GabrielDuf) merged 3 commits into
masterfrom
system-winget-resolution

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request introduces improved handling for locating and invoking the system WinGet executable, enhances the reliability of source mirroring, and adds comprehensive test coverage for these behaviors. It also updates documentation and bumps the CLI version. The most important changes are grouped below:

System WinGet Executable Resolution and Usage:

  • Introduced a new environment variable, PINGET_WINGET_PATH, allowing explicit configuration of the WinGet executable or its containing directory. The resolution order now checks this variable first, then the application directory, PATH, %LOCALAPPDATA%\Microsoft\WindowsApps, and finally the newest registered App Installer package root. This logic is now shared between the Rust CLI and C# core. [1] [2]
  • Updated the process invocation logic in SystemWingetSourceStore to use the resolved WinGet executable path instead of assuming a static name.

Source Mirror Caching and Query Reliability:

  • Implemented a freshness check for the system WinGet mirror cache, avoiding unnecessary re-exporting if the cache is less than 15 minutes old. Queries now use the cached mirror and report a warning if a refresh fails, rather than failing outright. [1] [2] [3] [4] [5]
  • Added documentation in README.md describing the new WinGet resolution process and improved explanation of source mirroring and fallback behavior.

Testing and Versioning:

  • Added extensive unit tests covering WinGet resolution precedence, error reporting, package name parsing, mirror cache freshness, and fallback behaviors when WinGet is unavailable.
  • Bumped the CLI version to 0.12.0 to reflect these significant changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Mirror freshness can be bypassed or incorrectly extended, and some storage failures still escape the cached-query fallback.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Improves WinGet executable resolution and source-mirror reliability while releasing version 0.12.0.

Changes:

  • Adds configurable, fallback-based WinGet discovery in Rust and C#.
  • Adds mirror freshness caching, failure warnings, and tests.
  • Updates documentation and package versions.
File summaries
File Description
README.md Documents WinGet resolution and mirror behavior.
rust/crates/pinget-core/src/lib.rs Implements Rust resolution, caching, and tests.
rust/crates/pinget-core/Cargo.toml Bumps core to 0.12.0.
rust/crates/pinget-com/Cargo.toml Bumps COM bridge to 0.12.0.
rust/crates/pinget-cli/Cargo.toml Bumps CLI and core dependency.
nuget/Devolutions.Pinget.Cli.Rust/Devolutions.Pinget.Cli.Rust.csproj Bumps Rust CLI package.
nuget/Devolutions.Pinget.Cli.DotNet/Devolutions.Pinget.Cli.DotNet.csproj Bumps .NET CLI package.
dotnet/src/Devolutions.Pinget.PowerShell.Engine/PowerShellEngineVersion.cs Updates engine version.
dotnet/src/Devolutions.Pinget.PowerShell.Cmdlets/ModuleFiles/Devolutions.Pinget.Client.psd1 Updates module version.
dotnet/src/Devolutions.Pinget.Core/SystemWingetSourceStore.cs Adds WinGet discovery and invocation handling.
dotnet/src/Devolutions.Pinget.Core/SourceStore.cs Adds mirror freshness checking.
dotnet/src/Devolutions.Pinget.Core/Repository.cs Adds cached query refresh and warnings.
dotnet/src/Devolutions.Pinget.Core.Tests/CoreTests.cs Tests resolution and mirror behavior.
dotnet/src/Devolutions.Pinget.Cli/Program.cs Updates CLI version.
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dotnet/src/Devolutions.Pinget.Core/Repository.cs
Comment thread dotnet/src/Devolutions.Pinget.Core/Repository.cs Outdated
Comment thread dotnet/src/Devolutions.Pinget.Core/SourceStore.cs Outdated
Comment thread rust/crates/pinget-core/src/lib.rs Outdated
@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit cc50e92 into master Sep 9, 2026
13 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the system-winget-resolution branch September 9, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants