Repository navigation
[repo-assist] Distinguish "package not found" from real conflicts in resolver errors - #4408
Merged
dsyme merged 1 commit intoAug 30, 2026
Conversation
When only a single requirement is involved in a resolution failure, there is no actual conflict between multiple requirements - the requested package or version range simply wasn't found in any configured source. Previously this case was reported with the header 'Conflict detected', which is misleading. This changes the single-requirement error path to report 'Package not found' instead, while genuine multi-requirement conflicts still report 'Conflict detected'. Closes #3446 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
marked this pull request as ready for review
August 30, 2026 13:04
17 tasks
This was referenced Oct 5, 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 is an automated pull request from Repo Assist, an AI assistant.
Closes #3446
Root cause
When Paket's resolver fails with only a single unmet requirement (no other requirement constraining the same package), it previously always printed:
As reported in #3446, this is misleading: there's no actual conflict between multiple requirements here — the requested package/version range simply wasn't available from any configured source. "Conflict" troubleshooting (multiple requirements pulling in different directions) is a very different mental model from "the version you asked for doesn't exist".
Fix
In
PackageResolver.fs,buildConflictReportnow takes a header string parameter. The single-requirement error path (cfs.Count = 1) now uses the header"Package not found"instead of"Conflict detected". The multi-requirement path (Count > 1, a genuine conflict between contradictory requirements) keeps"Conflict detected"unchanged.Trade-offs
updateShouldFindPackageConflict(used byResolverSkipsConflictsFastSpecs.fs) checks for"Conflict detected"combined with multiple requirements fromNinject's scenario, which produces a genuine multi-requirement conflict, so it is unaffected by this change (I verified there are no other tests asserting on the exact "Conflict detected" string for a single-requirement case).Test Status
dotnet build src/Paket.Core/Paket.Core.fsproj -c Debug: succeeded (net461 + netstandard2.0), pre-existing warnings only, no new ones introduced.dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~Resolver": 33 passed, 0 failed, 5 skipped (net9 target). The net461 target could not run in this sandbox because Mono is not installed (pre-existing environment limitation, unrelated to this change).Add this agentic workflow to your repo
To install this agentic workflow, run