Skip to content

Conversation

@MagicAndre1981
Copy link

@MagicAndre1981 MagicAndre1981 commented Dec 19, 2025

Summary:

When resolving package dependencies, winget previously selected only a single "latest" available package version and then attempted installer selection for that version. If that latest version lacked a compatible installer (for example, only x64/arm64 when x86 was required), dependency resolution failed immediately.

The normal install/update flows already iterate versions until they find a compatible installer; this change brings dependency resolution in line with that behavior.

What I changed:

  • DependencyNodeProcessor::EvaluateDependencies now iterates available versions (newest → oldest), checks dependency.MinVersion, respects pinning (--include-pinned) and --force, and runs ManifestComparator::GetPreferredInstaller for each manifest until a compatible installer is found.

How to test:

  • Try installing a package that depends on Git (e.g., TortoiseGit) on an x86 machine where the latest Git manifest has no x86 installer — the dependency flow should now fall back to an older x86 release.

Risks / notes:

  • Pinning semantics are preserved; pinned versions are skipped unless --include-pinned or --force is used."

Fixes: #5902


Microsoft Reviewers: Open in CodeFlow

@MagicAndre1981
Copy link
Author

@microsoft-github-policy-service agree

@MagicAndre1981
Copy link
Author

This was my first try to "fix" something with the help of @copilot . Local compile fails, so I don't know if this code even compiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

winget doesn't go from highest to lowest dependency version to resolve installer

1 participant