Improve winget upgrade parity#37
Merged
Gabriel Dufresne (GabrielDuf) merged 3 commits intoJun 4, 2026
Merged
Conversation
6973e3d to
e8fcfe9
Compare
Fix Pinget installer and upgrade behavior to better match WinGet, including elevated MSI/WiX dispatch, resumable installer downloads, source error reporting, and upgrade-list correlation/version parity in both Rust and C#. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e8fcfe9 to
048324f
Compare
The test machine_scope_silent_msi_uses_shell_execute_instead_of_direct_msi calls should_run_msi_direct and should_elevate_msi_shell_execute, which are both #[cfg(windows)]-only functions (since MSI direct/ShellExecute paths only apply on Windows). The test binary therefore failed to compile on the Linux CI runner with E0425 (cannot find function in this scope). Fix: add #[cfg(windows)] to the test itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Gabriel Dufresne (GabrielDuf)
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves Pinget parity with WinGet for package upgrades in both the Rust and C# implementations. It addresses several issues found while comparing local Pinget behavior against WinGet on real installed packages.
Fixes and behavior changes
MSI/WiX elevation parity
msiexec.exethrough the elevated shell-execute path instead of trying to execute the MSI package directly.1603.Resilient installer downloads
.partfiles with sidecar metadata for resume support.RangeandIf-Rangewhen the server provides a strong ETag or Last-Modified validator.200,206, and416responses explicitly.Source error diagnostics
no package matched the supplied queryerrors.--source wingetsingle-package operations now surface source/search failures directly, which makes transient source-cache or index-open issues easier to diagnose.Upgrade-list parity with WinGet
list --upgrade-available --source winget, matching WinGet's accepted command shape.versionDatamapping for packages with coarse DisplayVersion values.< latestdisplay form only for the Snagit-style case where the installed ARP version is equal to the catalog version but below the catalog's ARP build range.17.0.18.8, displayed as their actual installed version instead of rewriting them to< 17.0.19.10.Local comparison results
After the fixes, the locally built Rust executable reports the same upgrade count as WinGet on this machine:
Both commands reported 45 upgrades. Pinget now includes the previously missed entries and no longer includes the investigated false positives.
Validation
cargo +nightly fmt --manifest-path rust\Cargo.toml --allcargo clippy -q --manifest-path rust\Cargo.toml --workspace --tests -- -D warningscargo test -p pinget-core --manifest-path rust\Cargo.tomlcargo test -p pinget-cli --manifest-path rust\Cargo.tomlcargo build -p pinget-cli --manifest-path rust\Cargo.toml --releasedotnet format dotnet\Devolutions.Pinget.slnxdotnet build dotnet\Devolutions.Pinget.slnx -c Releasedotnet test dotnet\src\Devolutions.Pinget.Core.Tests\Devolutions.Pinget.Core.Tests.csproj -c Release --no-buildpwsh -NoLogo -NoProfile -File (Resolve-Path 'dotnet\tests\RunTests.ps1')The branch was rebased onto
origin/master; this repository does not currently have anorigin/mainref.