Filter upgrade visibility based on host architecture compatibility#25
Merged
Conversation
winget hides upgrades whose latest catalog version has no installer for an architecture the host can execute. On arm64 Windows, x86 and x64 installers are runnable via emulation, so they stay; a manifest that only ships installers for an arch outside the host's preference list disappears from `upgrade` output entirely.
Marc-André Moreau (mamoreau-devolutions)
previously approved these changes
May 19, 2026
Contributor
Marc-André Moreau (mamoreau-devolutions)
left a comment
There was a problem hiding this comment.
see comments from GitHub Copilot, there are some things that may be problematic for NativeAOT
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
May 19, 2026 14:23
View session
There was a problem hiding this comment.
Pull request overview
Adds host-architecture compatibility filtering so packages whose latest catalog version publishes no installer the host can run are hidden from bulk upgrade output (mirroring winget), in both the Rust and .NET implementations. Also includes unrelated PowerShell/CI changes to honor PINGET_APPROOT when locating settings, so parity tests can share state with packaged winget.
Changes:
- New
correlated_lacks_compatible_installer/CorrelatedLacksCompatibleInstallerfield onInstalledPackage, populated from the latest manifest's installer architectures during catalog enrichment, and consulted in the upgrade filter (bypassed when an explicit id/etc. filter is active). - New
manifest_has_compatible_installer/ManifestHasCompatibleInstallerhelper plus a Windows-awarecurrent_architecture()in Rust that usesIsWow64Process2to detect the native machine (avoiding mis-reporting when running emulated). AddedWin32_System_SystemInformationfeature towindows-sys. - Parity script/workflow updates:
Get-ExpectedUserSettingsPathhonors$env:PINGET_APPROOT(packaged-layout aware), andparity-test.ymlsetsPINGET_APPROOTto winget's packagedLocalStateso cross-CLI coherence tests share stores. - Test coverage for the new filter behavior and helper in both Rust and .NET.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rust/crates/pinget-core/src/lib.rs | New field, filter rule, manifest compatibility helper, Windows native-arch detection, and supporting tests. |
| rust/crates/pinget-core/Cargo.toml | Adds Win32_System_SystemInformation feature for IsWow64Process2. |
| dotnet/src/Devolutions.Pinget.Core/Models.cs | Adds CorrelatedLacksCompatibleInstaller to InstalledPackage. |
| dotnet/src/Devolutions.Pinget.Core/Repository.cs | Populates the flag during enrichment, adds filter rule and ManifestHasCompatibleInstaller helper plus test hook. |
| dotnet/src/Devolutions.Pinget.Core.Tests/CoreTests.cs | xUnit tests for the new filter behavior and helper. |
| scripts/Parity-Compare-WingetParity.ps1 | Get-ExpectedUserSettingsPath now honors PINGET_APPROOT with packaged-layout detection. |
| .github/workflows/parity-test.yml | Sets PINGET_APPROOT to winget's packaged LocalState for parity tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Repository.ParseYamlManifest/ParseYamlManifestDocuments now walk YamlDotNet's IParser events directly instead of calling Deserialize<object?>/Deserialize<Dictionary<string, object?>>, which require dynamic code (IL3050) and trim-unsafe reflection (IL2026) under AOT. The walker produces the same Dictionary<object,object> / List<object> / string tree, so all downstream pattern matches and ReadBool calls work unchanged. NameNormalization is now a partial class with [GeneratedRegex] methods. RegexOptions.Compiled silently falls back to the interpreter under AOT, so the 32-regex hot path on ARP normalization would have regressed; source-generated regex restores native-quality performance and removes AOT warnings.
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
May 19, 2026 14:57
View session
Marc-André Moreau (mamoreau-devolutions)
previously approved these changes
May 19, 2026
Maxim Buisson (MaxBuisson)
approved these changes
May 19, 2026
Marc-André Moreau (mamoreau-devolutions)
approved these changes
May 19, 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.
This pull request improves the upgrade logic for packages in both the Rust and .NET implementations of Pinget. The main focus is to ensure that packages whose latest catalog version has no installer compatible with the user's system architecture are hidden from bulk upgrade listings, matching the behavior of
winget. The changes also include thorough test coverage and internal refactoring to support this logic.Upgrade filtering enhancements:
correlated_lacks_compatible_installertoInstalledPackage(Rust:struct InstalledPackage, .NET:InstalledPackageclass) to track whether the latest catalog version has a compatible installer for the host architecture.